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/protocols/SessionLock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/protocols/SessionLock.cpp') diff --git a/src/protocols/SessionLock.cpp b/src/protocols/SessionLock.cpp index 6ff9171e..ab70a0d4 100644 --- a/src/protocols/SessionLock.cpp +++ b/src/protocols/SessionLock.cpp @@ -1,5 +1,4 @@ #include "SessionLock.hpp" -#include "../Compositor.hpp" #include "../managers/SeatManager.hpp" #include "FractionalScale.hpp" #include "LockNotify.hpp" @@ -7,6 +6,7 @@ #include "core/Output.hpp" #include "../helpers/Monitor.hpp" #include "../render/Renderer.hpp" +#include "../desktop/state/FocusState.hpp" CSessionLockSurface::CSessionLockSurface(SP resource_, SP surface_, PHLMONITOR pMonitor_, WP owner_) : m_resource(resource_), m_sessionLock(owner_), m_surface(surface_), m_monitor(pMonitor_) { @@ -51,8 +51,8 @@ CSessionLockSurface::CSessionLockSurface(SP resource_, m_surface->unmap(); m_listeners.surfaceCommit.reset(); m_listeners.surfaceDestroy.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(); }); -- cgit v1.2.3