From e4d05c90ce755a609cbec229a54d0069f21e7d53 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 14 Apr 2022 21:30:18 +0200 Subject: [PATCH] fix pointer focus coords in focusWindow --- src/Compositor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 45e2444b..753e61c2 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -380,8 +380,9 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { g_pXWaylandManager->activateWindow(pWindow, true); - // do pointer focus too - wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, 0, 0); + // do pointer focus too + const auto POINTERLOCAL = g_pInputManager->getMouseCoordsInternal() - pWindow->m_vRealPosition; + wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, POINTERLOCAL.x, POINTERLOCAL.y); m_pLastWindow = pWindow; }