diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 19:18:33 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 19:18:33 +0100 |
| commit | 295a0c4a6904b639ae406df2f106eb35d71899ae (patch) | |
| tree | 55ba41ed80f20b798e3f7719323dfb673787a44b /src/managers/KeybindManager.cpp | |
| parent | 1b50377a5aaa8d5e2585d72dc5393ac6ad6fe248 (diff) | |
Added fullscreen
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index befff4b8..a26a943b 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -44,6 +44,7 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t else if (k.handler == "killactive") { killActive(k.arg); } else if (k.handler == "togglefloating") { toggleActiveFloating(k.arg); } else if (k.handler == "workspace") { changeworkspace(k.arg); } + else if (k.handler == "fullscreen") { fullscreenActive(k.arg); } found = true; } @@ -143,4 +144,13 @@ void CKeybindManager::changeworkspace(std::string args) { // we need to move XWayland windows to narnia or otherwise they will still process our cursor and shit // and that'd be annoying as hell g_pCompositor->fixXWaylandWindowsOnWorkspace(OLDWORKSPACE); +} + +void CKeybindManager::fullscreenActive(std::string args) { + const auto PWINDOW = g_pCompositor->getWindowFromSurface(g_pCompositor->m_pLastFocus); + + if (!g_pCompositor->windowValidMapped(PWINDOW)) + return; + + g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW); }
\ No newline at end of file |
