summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authoroutfoxxed <outfoxxed@outfoxxed.me>2025-05-17 04:06:48 -0700
committerGitHub <noreply@github.com>2025-05-17 13:06:48 +0200
commit2aa21625bd9036a918c220b89ff94d003fb6cbe7 (patch)
treef2f5b9b2185858c4b73103d9fcaa66b5de9f2cc0 /src/managers/input/InputManager.cpp
parent2946009006bd8a988ff8a51b83528f6e1d8f0e98 (diff)
input: ensure seat grabs from exclusive layers can be dismissed (#10418)
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index cc46aaec..69c70af8 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -607,6 +607,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) {
foundSurface = nullptr;
}
+ // Releases any seat grabs after a click outside of them not handled by an earlier case (notably exclusive layers).
+ if ((m_hardInput || refocus) && g_pSeatManager->m_seatGrab && !foundSurface) {
+ g_pSeatManager->setGrab(nullptr);
+ return; // setGrab will refocus
+ }
+
g_pSeatManager->setPointerFocus(foundSurface, surfaceLocal);
g_pSeatManager->sendPointerMotion(time, surfaceLocal);
}