diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-05-17 19:43:12 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-05-17 19:43:12 +0200 |
| commit | 705b97c4ac93148820012c701fe39445cf76a590 (patch) | |
| tree | 4c3cd47a1684807a7d24f1c83106b0451173a8ff /src/managers/input/InputManager.cpp | |
| parent | c19f383685000fcf61706c95feb4d80d22c9afe5 (diff) | |
input: revert #10416 and #10418
fixes #10451
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 69c70af8..cd603ca5 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -201,7 +201,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { Vector2D surfacePos = Vector2D(-1337, -1337); PHLWINDOW pFoundWindow; PHLLS pFoundLayerSurface; - bool sendExternalMouseEvents = false; EMIT_HOOK_EVENT_CANCELLABLE("mouseMove", MOUSECOORDSFLOORED); @@ -298,8 +297,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { // and we're not dnd-ing, don't refocus. Keep focus on last surface. if (!PROTO::data->dndActive() && !m_currentlyHeldButtons.empty() && g_pCompositor->m_lastFocus && g_pCompositor->m_lastFocus->m_mapped && g_pSeatManager->m_state.pointerFocus && !m_hardInput) { - foundSurface = g_pSeatManager->m_state.pointerFocus.lock(); - sendExternalMouseEvents = true; + foundSurface = g_pSeatManager->m_state.pointerFocus.lock(); // IME popups aren't desktop-like elements // TODO: make them. @@ -600,19 +598,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { m_lastFocusOnLS = true; } - // Don't send events outside of the surface unless holding a mouse button, - // except for X11 surfaces which are always sent events in case of potential breakage. - if (!sendExternalMouseEvents && foundSurface && (!pFoundWindow || !pFoundWindow->m_isX11)) { - if (!foundSurface->at(surfaceLocal, true).first) - 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); } |
