diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-11-04 21:03:08 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-11-04 21:03:08 +0000 |
| commit | 74cf2281dd38a533916eb0b201c3128423b94d7c (patch) | |
| tree | 160b8b45ba3d030ca4f0c7835c94bdc864502905 /src/managers/KeybindManager.cpp | |
| parent | 2b07d54bc74f34a3561612bedaa44ad8ab550b8b (diff) | |
binds: add movefocus_cycles_fullscreen
fixes #3738
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index ac995ad9..3bed027d 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1004,7 +1004,8 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) { } void CKeybindManager::moveFocusTo(std::string args) { - char arg = args[0]; + static auto* const PFULLCYCLE = &g_pConfigManager->getConfigValuePtr("binds:movefocus_cycles_fullscreen")->intValue; + char arg = args[0]; if (!isDirection(args)) { Debug::log(ERR, "Cannot move focus in direction {}, unsupported direction. Supported: l,r,u/t,d/b", arg); @@ -1020,7 +1021,7 @@ void CKeybindManager::moveFocusTo(std::string args) { // remove constraints g_pInputManager->unconstrainMouse(); - const auto PWINDOWTOCHANGETO = PLASTWINDOW->m_bIsFullscreen ? + const auto PWINDOWTOCHANGETO = *PFULLCYCLE && PLASTWINDOW->m_bIsFullscreen ? (arg == 'd' || arg == 'b' || arg == 'r' ? g_pCompositor->getNextWindowOnWorkspace(PLASTWINDOW, true) : g_pCompositor->getPrevWindowOnWorkspace(PLASTWINDOW, true)) : g_pCompositor->getWindowInDirection(PLASTWINDOW, arg); |
