From 5c8a20be77dab288171ef4d63c3993e4bf4f0eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Donk=C3=B3?= Date: Tue, 18 Jul 2023 12:12:50 +0200 Subject: [PATCH] fix: handle window change directions in fullscreen (#2728) --- src/managers/KeybindManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 4b2f1f63..f86134df 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1013,8 +1013,11 @@ void CKeybindManager::moveFocusTo(std::string args) { } }; - const auto PWINDOWTOCHANGETO = PLASTWINDOW->m_bIsFullscreen ? g_pCompositor->getNextWindowOnWorkspace(PLASTWINDOW, arg == 'u' || arg == 't' || arg == 'r') : - g_pCompositor->getWindowInDirection(PLASTWINDOW, arg); + const auto PWINDOWTOCHANGETO = PLASTWINDOW->m_bIsFullscreen + ? (arg == 'd' || arg == 'b' || arg == 'r' + ? g_pCompositor->getNextWindowOnWorkspace(PLASTWINDOW, true) + : g_pCompositor->getPrevWindowOnWorkspace(PLASTWINDOW, true)) + : g_pCompositor->getWindowInDirection(PLASTWINDOW, arg); // Found window in direction, switch to it if (PWINDOWTOCHANGETO) {