diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index b61caaa..376292d 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -6540,6 +6540,18 @@ wl_pointer_change_grab(unsigned int event_mask, int cursor_id, unsigned long timestamp) { (void)event_mask; (void)timestamp; + /* If no grab is active, start a WM policy grab (type 3) so that + * wl_update_pointer_focus doesn't reset the cursor on every motion + * event when the pointer is over frame decorations. + * This handles the opaque-move path where moveres.c calls + * pointer_change_grab without first calling pointer_grab. */ + if (!wl_state.grab_type) { + wl_state.grab_type = 3; + wl_state.grab_view = NULL; + if (wl_state.seat) + wlr_seat_pointer_clear_focus(wl_state.seat); + wwarning("wl_backend: grab established via pointer_change_grab"); + } /* Map WCUR_* cursor IDs to xcursor names */ const char *name; switch (cursor_id) {