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/render/OpenGL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/render/OpenGL.cpp') diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index b2ec69f3..d93e7196 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -14,6 +14,7 @@ #include "../config/ConfigManager.hpp" #include "../managers/PointerManager.hpp" #include "../desktop/LayerSurface.hpp" +#include "../desktop/state/FocusState.hpp" #include "../protocols/LayerShell.hpp" #include "../protocols/core/Compositor.hpp" #include "../protocols/ColorManagement.hpp" @@ -424,7 +425,7 @@ CHyprOpenGLImpl::CHyprOpenGLImpl() : m_drmFD(g_pCompositor->m_drmRenderNode.fd > auto PMONITOR = g_pCompositor->getMonitorFromName(!E.device->m_boundOutput.empty() ? E.device->m_boundOutput : ""); - PMONITOR = PMONITOR ? PMONITOR : g_pCompositor->m_lastMonitor.lock(); + PMONITOR = PMONITOR ? PMONITOR : Desktop::focusState()->monitor(); const auto TOUCH_COORDS = PMONITOR->m_position + (E.pos * PMONITOR->m_size); -- cgit v1.2.3