diff options
author | vaxerski <[email protected]> | 2023-01-11 17:59:35 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-01-11 17:59:35 +0100 |
commit | c4e422644b82e04f5664661bd1b133476410a449 (patch) | |
tree | 3605579466fb6765c2c91e00cec86153950a15f0 | |
parent | df30f0519af12630693ed82724901d80bb6833bb (diff) | |
download | Hyprland-c4e422644b82e04f5664661bd1b133476410a449.tar.gz Hyprland-c4e422644b82e04f5664661bd1b133476410a449.zip |
move window to top if floating activate
-rw-r--r-- | src/events/Windows.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index cbee36fc..aa0612fc 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -808,6 +808,9 @@ void Events::listener_activateXDG(wl_listener* listener, void* data) { if (!PWINDOW || PWINDOW == g_pCompositor->m_pLastWindow) return; + if (PWINDOW->m_bIsFloating) + g_pCompositor->moveWindowToTop(PWINDOW); + g_pCompositor->focusWindow(PWINDOW); Vector2D middle = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f; g_pCompositor->warpCursorTo(middle); @@ -823,6 +826,9 @@ void Events::listener_activateX11(void* owner, void* data) { if (!*PFOCUSONACTIVATE || PWINDOW->m_iX11Type != 1 || PWINDOW == g_pCompositor->m_pLastWindow) return; + if (PWINDOW->m_bIsFloating) + g_pCompositor->moveWindowToTop(PWINDOW); + g_pCompositor->focusWindow(PWINDOW); Vector2D middle = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f; g_pCompositor->warpCursorTo(middle); |