fix: handle window change directions in fullscreen (#2728)

This commit is contained in:
István Donkó 2023-07-18 12:12:50 +02:00 committed by GitHub
parent d2eb4fee76
commit 5c8a20be77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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') : const auto PWINDOWTOCHANGETO = PLASTWINDOW->m_bIsFullscreen
g_pCompositor->getWindowInDirection(PLASTWINDOW, arg); ? (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 // Found window in direction, switch to it
if (PWINDOWTOCHANGETO) { if (PWINDOWTOCHANGETO) {