diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 7e85bb4..397caa5 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -4911,6 +4911,9 @@ wl_update_pointer_focus(uint32_t time_msec) wwarning("wl_backend: pointer focus entered surface %p at %.1f,%.1f", (void *)surface, sx, sy); last_focused_surface = surface; + /* Reset to default cursor; client will override via + * request_set_cursor after receiving wl_pointer.enter. */ + 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); @@ -4921,6 +4924,9 @@ wl_update_pointer_focus(uint32_t time_msec) last_focused_surface = NULL; } wlr_seat_pointer_clear_focus(wl_state.seat); + /* Restore WM cursor — the client may have set its own cursor + * surface which becomes invalid once pointer focus leaves. */ + wl_set_cursor_image("left_ptr"); } /* Phase 29 (FFP): focus-follows-pointer — when the pointer enters a new * managed view, deliver WM keyboard focus without raising.