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/protocols/InputMethodV2.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/protocols/InputMethodV2.cpp')
| -rw-r--r-- | src/protocols/InputMethodV2.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/protocols/InputMethodV2.cpp b/src/protocols/InputMethodV2.cpp index d66d1f24..eaf7f141 100644 --- a/src/protocols/InputMethodV2.cpp +++ b/src/protocols/InputMethodV2.cpp @@ -1,7 +1,8 @@ #include "InputMethodV2.hpp" -#include "../Compositor.hpp" +#include "../desktop/state/FocusState.hpp" #include "../managers/SeatManager.hpp" #include "../devices/IKeyboard.hpp" +#include "../helpers/MiscFunctions.hpp" #include <sys/mman.h> #include "core/Compositor.hpp" #include <cstring> @@ -96,8 +97,8 @@ CInputMethodPopupV2::CInputMethodPopupV2(SP<CZwpInputPopupSurfaceV2> resource_, m_listeners.destroySurface.reset(); m_listeners.commitSurface.reset(); - if (g_pCompositor->m_lastFocus == m_surface) - g_pCompositor->m_lastFocus.reset(); + if (Desktop::focusState()->surface() == m_surface) + Desktop::focusState()->surface().reset(); m_surface.reset(); }); |
