summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp9
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 {