summaryrefslogtreecommitdiff
path: root/src/desktop/LayerSurface.cpp
diff options
context:
space:
mode:
authoroutfoxxed <outfoxxed@outfoxxed.me>2025-05-15 02:16:03 -0700
committerGitHub <noreply@github.com>2025-05-15 10:16:03 +0100
commitdfb841c303263208c2f8ac7a55fbdf4668594fb7 (patch)
tree2dd17f5aa63ec04347e24f574e34c36414826b94 /src/desktop/LayerSurface.cpp
parent5ceb0ec15df6301cafe95a1b1f73b4f4bf255968 (diff)
desktop: prevent layers from dismissing their own seat grabs on map (#10417)
Diffstat (limited to 'src/desktop/LayerSurface.cpp')
-rw-r--r--src/desktop/LayerSurface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp
index f913b658..048a3641 100644
--- a/src/desktop/LayerSurface.cpp
+++ b/src/desktop/LayerSurface.cpp
@@ -167,7 +167,9 @@ void CLayerSurface::onMap() {
if (GRABSFOCUS) {
// TODO: use the new superb really very cool grab
- g_pSeatManager->setGrab(nullptr);
+ if (g_pSeatManager->m_seatGrab && !g_pSeatManager->m_seatGrab->accepts(m_surface->resource()))
+ g_pSeatManager->setGrab(nullptr);
+
g_pInputManager->releaseAllMouseButtons();
g_pCompositor->focusSurface(m_surface->resource());