keybinds: focus floating on top of fs

This commit is contained in:
Vaxry 2024-02-26 00:15:59 +00:00
parent a14f6b570f
commit 9815402074

View file

@ -1763,6 +1763,15 @@ void CKeybindManager::focusWindow(std::string regexp) {
const auto FSWINDOW = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
const auto FSMODE = PWORKSPACE->m_efFullscreenMode;
if (PWINDOW->m_bIsFloating) {
// don't make floating implicitly fs
if (!PWINDOW->m_bCreatedOverFullscreen) {
g_pCompositor->changeWindowZOrder(PWINDOW, true);
g_pCompositor->updateFullscreenFadeOnWorkspace(PWORKSPACE);
}
g_pCompositor->focusWindow(PWINDOW);
} else {
if (FSWINDOW != PWINDOW && !PWINDOW->m_bPinned)
g_pCompositor->setWindowFullscreen(FSWINDOW, false, FULLSCREEN_FULL);
@ -1770,9 +1779,9 @@ void CKeybindManager::focusWindow(std::string regexp) {
if (FSWINDOW != PWINDOW && !PWINDOW->m_bPinned)
g_pCompositor->setWindowFullscreen(PWINDOW, true, FSMODE);
} else {
g_pCompositor->focusWindow(PWINDOW);
}
} else
g_pCompositor->focusWindow(PWINDOW);
g_pCompositor->warpCursorTo(PWINDOW->middle());
}