diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 289fdafbd..2e67cbdea 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -796,6 +796,8 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { } if (!pWindow || !windowValidMapped(pWindow)) { + g_pInputManager->releaseAllMouseButtons(); + const auto PLASTWINDOW = m_pLastWindow; m_pLastWindow = nullptr; @@ -868,6 +870,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { // do pointer focus too const auto POINTERLOCAL = g_pInputManager->getMouseCoordsInternal() - pWindow->m_vRealPosition.goalv(); + g_pInputManager->releaseAllMouseButtons(); wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, POINTERLOCAL.x, POINTERLOCAL.y); updateWindowAnimatedDecorationValues(pWindow);