summaryrefslogtreecommitdiff
path: root/src/protocols/PointerConstraints.cpp
diff options
context:
space:
mode:
authorNikolai Nechaev <nikolay_nechaev@mail.ru>2025-11-26 07:44:26 +0900
committerGitHub <noreply@github.com>2025-11-25 22:44:26 +0000
commit40d8fa84919c6d0e9fcb1536f4bc09710d4c031c (patch)
treee45044c92e5d8f716f2aa15668c61fed5aaf5895 /src/protocols/PointerConstraints.cpp
parent1c1746de61a90dbbae072f3fc618c45af33fdd59 (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/PointerConstraints.cpp')
-rw-r--r--src/protocols/PointerConstraints.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/protocols/PointerConstraints.cpp b/src/protocols/PointerConstraints.cpp
index 24ccc980..5ecaa43b 100644
--- a/src/protocols/PointerConstraints.cpp
+++ b/src/protocols/PointerConstraints.cpp
@@ -1,6 +1,7 @@
#include "PointerConstraints.hpp"
#include "../desktop/WLSurface.hpp"
-#include "../Compositor.hpp"
+#include "../desktop/state/FocusState.hpp"
+#include "../desktop/Window.hpp"
#include "../config/ConfigValue.hpp"
#include "../managers/SeatManager.hpp"
#include "core/Compositor.hpp"
@@ -242,7 +243,7 @@ void CPointerConstraintsProtocol::onNewConstraint(SP<CPointerConstraint> constra
g_pInputManager->m_constraints.emplace_back(constraint);
- if (g_pCompositor->m_lastFocus == OWNER->resource())
+ if (Desktop::focusState()->surface() == OWNER->resource())
constraint->activate();
}