diff options
| author | Nikolai Nechaev <nikolay_nechaev@mail.ru> | 2025-11-26 07:44:26 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-25 22:44:26 +0000 |
| commit | 40d8fa84919c6d0e9fcb1536f4bc09710d4c031c (patch) | |
| tree | e45044c92e5d8f716f2aa15668c61fed5aaf5895 /src/managers/XWaylandManager.cpp | |
| parent | 1c1746de61a90dbbae072f3fc618c45af33fdd59 (diff) | |
compositor: Configurable behavior when window to be focused conflicts with fullscreen (#12033)
Renames `misc:new_window_takes_over_fullscreen` into
`misc:on_focus_under_fullscreen` and implements the following behavior:
- By default, when a tiling window is being focused on a workspace where
a fullscreen/maximized window exists, respect
the `misc:on_focus_under_fullscreen` config variable.
Diffstat (limited to 'src/managers/XWaylandManager.cpp')
| -rw-r--r-- | src/managers/XWaylandManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 460e9ecd..38afe4ac 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -1,5 +1,6 @@ #include "XWaylandManager.hpp" #include "../Compositor.hpp" +#include "../desktop/state/FocusState.hpp" #include "../events/Events.hpp" #include "../config/ConfigValue.hpp" #include "../helpers/Monitor.hpp" @@ -69,8 +70,8 @@ void CHyprXWaylandManager::activateWindow(PHLWINDOW pWindow, bool activate) { pWindow->m_xdgSurface->m_toplevel->setActive(activate); if (activate) { - g_pCompositor->m_lastFocus = getWindowSurface(pWindow); - g_pCompositor->m_lastWindow = pWindow; + Desktop::focusState()->surface() = getWindowSurface(pWindow); + Desktop::focusState()->window() = pWindow; } if (!pWindow->m_pinned) |
