diff options
author | Vaxry <[email protected]> | 2024-02-12 20:01:50 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-02-12 20:02:00 +0000 |
commit | 890307532caa3369ea089b606b7786ccce4b8504 (patch) | |
tree | f1ea2bd190cb80592e315df4dd523e4801465260 | |
parent | f33d73b9cf102d5de7bcc29721ec4f8fc7c0d66d (diff) | |
download | Hyprland-890307532caa3369ea089b606b7786ccce4b8504.tar.gz Hyprland-890307532caa3369ea089b606b7786ccce4b8504.zip |
input: avoid reassigns of unchanged surfaces in processMouseRequest
-rw-r--r-- | src/managers/input/InputManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 9f713b03..b36b0034 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -487,10 +487,15 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even return; if (e->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client) { - m_sCursorSurfaceInfo.wlSurface.unassign(); + + if (e->surface != m_sCursorSurfaceInfo.wlSurface.wlr()) { + m_sCursorSurfaceInfo.wlSurface.unassign(); + + if (e->surface) + m_sCursorSurfaceInfo.wlSurface.assign(e->surface); + } if (e->surface) { - m_sCursorSurfaceInfo.wlSurface.assign(e->surface); m_sCursorSurfaceInfo.vHotspot = {e->hotspot_x, e->hotspot_y}; m_sCursorSurfaceInfo.hidden = false; } else { |