diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-19 21:36:03 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-04-19 21:36:08 +0100 |
| commit | f914a5a06d75fcbdf53a03b820fcc8c0ff822b15 (patch) | |
| tree | d518bd8eabfcaad0ae72d0199ed34a130d292468 /src/Compositor.cpp | |
| parent | 6225591dbd77919beafc632e0795c6296e1da876 (diff) | |
input: release mouse buttons before refocuses
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 289fdafb..2e67cbde 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); |
