diff --git a/src/backend/wayland/wl_pointer_motion.c b/src/backend/wayland/wl_pointer_motion.c index 9a36d72..853fbf9 100644 --- a/src/backend/wayland/wl_pointer_motion.c +++ b/src/backend/wayland/wl_pointer_motion.c @@ -16,6 +16,7 @@ /* Forward declarations for functions defined in other wl_*.c files */ void W_WL_EnqueueEvent(struct W_Screen *scr, const WMEvent *ev, struct W_View *target); extern void (*W_SetCursorImageFn)(const char *name); +void wl_set_cursor_image(const char *name); void wl_view_destroyed_hook(struct W_View *v) { @@ -194,6 +195,8 @@ handle_pointer_motion(struct wl_listener *listener, void *data) xev.u.crossing.detail = WM_NOTIFY_ANCESTOR; W_WL_EnqueueEvent(wmscr, &xev, NULL); wl_state.last_hovered_id = new_id; + if (new_id) + wl_set_cursor_image("left_ptr"); } } if (wl_state.grab_type) { wl_grab_apply_motion(); return; } @@ -292,6 +295,8 @@ handle_pointer_motion_absolute(struct wl_listener *listener, void *data) xev.u.crossing.detail = WM_NOTIFY_ANCESTOR; W_WL_EnqueueEvent(wmscr2, &xev, NULL); wl_state.last_hovered_id = new_id; + if (new_id) + wl_set_cursor_image("left_ptr"); } } if (wl_state.grab_type) { wl_grab_apply_motion(); return; }