From 40d8fa84919c6d0e9fcb1536f4bc09710d4c031c Mon Sep 17 00:00:00 2001 From: Nikolai Nechaev Date: Wed, 26 Nov 2025 07:44:26 +0900 Subject: 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. --- src/xwayland/XWM.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/xwayland/XWM.cpp') diff --git a/src/xwayland/XWM.cpp b/src/xwayland/XWM.cpp index 9abd955a..316a9788 100644 --- a/src/xwayland/XWM.cpp +++ b/src/xwayland/XWM.cpp @@ -20,6 +20,7 @@ #include "../managers/ANRManager.hpp" #include "../protocols/XWaylandShell.hpp" #include "../protocols/core/Compositor.hpp" +#include "../desktop/state/FocusState.hpp" using Hyprutils::Memory::CUniquePointer; using namespace Hyprutils::OS; @@ -1037,7 +1038,7 @@ void CXWM::activateSurface(SP surf, bool activate) { if ((surf == m_focusedSurface && activate) || (surf && surf->m_overrideRedirect)) return; - if (!surf || (!activate && g_pCompositor->m_lastWindow && !g_pCompositor->m_lastWindow->m_isX11)) { + if (!surf || (!activate && Desktop::focusState()->window() && !Desktop::focusState()->window()->m_isX11)) { setActiveWindow(XCB_WINDOW_NONE); focusWindow(nullptr); } else { -- cgit v1.2.3