From 2aa21625bd9036a918c220b89ff94d003fb6cbe7 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sat, 17 May 2025 04:06:48 -0700 Subject: [PATCH] input: ensure seat grabs from exclusive layers can be dismissed (#10418) --- src/managers/input/InputManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index cc46aaec1..69c70af85 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); }