ibeam: read attribs.cursor from view on hover

This commit is contained in:
lkn 2026-06-23 23:51:32 +02:00
parent c6eba5ed58
commit 2c3f244983
1 changed files with 5 additions and 5 deletions

View File

@ -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