mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 17:05:59 +01:00
keybinds: focus floating on top of fs
This commit is contained in:
parent
a14f6b570f
commit
9815402074
1 changed files with 16 additions and 7 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue