From 29626989e7ac89ee596af01dfdefad6118324d5d Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 18 Sep 2022 12:35:05 +0100 Subject: [PATCH] fix focus follows mouse 0 event sending on wrong window --- src/managers/input/InputManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 2e1d2869..7b0e0fbb 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -286,7 +286,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y); } - wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y); + if (*PFOLLOWMOUSE != 0 || pFoundWindow == g_pCompositor->m_pLastWindow) + wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, time, surfaceLocal.x, surfaceLocal.y); + m_bLastFocusOnLS = false; return; // don't enter any new surfaces } else {