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/desktop/Subsurface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/desktop/Subsurface.cpp') diff --git a/src/desktop/Subsurface.cpp b/src/desktop/Subsurface.cpp index ba7340f1..cea6977a 100644 --- a/src/desktop/Subsurface.cpp +++ b/src/desktop/Subsurface.cpp @@ -1,6 +1,7 @@ #include "Subsurface.hpp" #include "../events/Events.hpp" -#include "../Compositor.hpp" +#include "../desktop/state/FocusState.hpp" +#include "../desktop/Window.hpp" #include "../config/ConfigValue.hpp" #include "../protocols/core/Compositor.hpp" #include "../protocols/core/Subcompositor.hpp" @@ -163,7 +164,7 @@ void CSubsurface::onMap() { void CSubsurface::onUnmap() { damageLastArea(); - if (m_wlSurface->resource() == g_pCompositor->m_lastFocus) + if (m_wlSurface->resource() == Desktop::focusState()->surface()) g_pInputManager->releaseAllMouseButtons(); g_pInputManager->simulateMouseMovement(); -- cgit v1.2.3