diff --git a/src/backend/wayland/wl_pointer_motion.c b/src/backend/wayland/wl_pointer_motion.c index 5a1ab25..4e67e61 100644 --- a/src/backend/wayland/wl_pointer_motion.c +++ b/src/backend/wayland/wl_pointer_motion.c @@ -152,12 +152,12 @@ handle_pointer_motion(struct wl_listener *listener, void *data) W_WL_EnqueueEvent(wmscr, &cev, mtarget); } wl_state.last_hovered_view = mtarget; - /* Apply the new view's cursor shape */ - if (mtarget && mtarget->cursor && W_SetCursorImageFn) { - const char *cname = (const char *)(uintptr_t)mtarget->cursor; + /* Apply the new view's cursor (attribs.cursor set at widget creation) */ + if (W_SetCursorImageFn) { + WMNativeCursor c = mtarget ? mtarget->attribs.cursor : 0; + if (!c && mtarget) c = mtarget->cursor; + const char *cname = c ? (const char *)(uintptr_t)c : "left_ptr"; W_SetCursorImageFn(cname); - } else if (W_SetCursorImageFn) { - W_SetCursorImageFn("left_ptr"); } } /* Emit synthetic LEAVE/ENTER when pointer crosses WM sub-window