wl_backend: cursor reset only on pointer leave (no enter reset) — fixes move cursor, no I-beam leak

This commit is contained in:
Ollie 2026-05-29 17:19:14 +02:00
parent fd7a760ce3
commit da9a62bf23
1 changed files with 2 additions and 7 deletions

View File

@ -6436,11 +6436,6 @@ wl_update_pointer_focus(uint32_t time_msec)
if (surface) {
if (surface != last_focused_surface) {
last_focused_surface = surface;
/* Set default cursor on new surface entry. The client will
* override via wl_pointer.set_cursor, but if we're in a grab
* (move/resize, DND) the grab system manages the cursor. */
if (!wl_state.grab_type)
wl_set_cursor_image("left_ptr");
}
wlr_seat_pointer_notify_enter(wl_state.seat, surface, sx, sy);
wlr_seat_pointer_notify_motion(wl_state.seat, time_msec, sx, sy);
@ -6450,8 +6445,8 @@ wl_update_pointer_focus(uint32_t time_msec)
last_focused_surface = NULL;
}
wlr_seat_pointer_clear_focus(wl_state.seat);
/* Restore WM cursor when pointer leaves all surfaces.
* Don't reset during grabs — pointer_change_grab manages that. */
/* When pointer leaves all surfaces, reset to default arrow.
* Don't reset during grabs — the grab system manages the cursor. */
if (!wl_state.grab_type)
wl_set_cursor_image("left_ptr");
}