diff --git a/masonry/src/contexts.rs b/masonry/src/contexts.rs index 8886304e3..d95077ee7 100644 --- a/masonry/src/contexts.rs +++ b/masonry/src/contexts.rs @@ -368,7 +368,7 @@ impl_context_method!( // --- MARK: CURSOR --- // Cursor-related impls. -impl_context_method!(EventCtx<'_>, { +impl_context_method!(MutateCtx<'_>, EventCtx<'_>, UpdateCtx<'_>, { /// Notifies Masonry that the cursor returned by [`Widget::get_cursor`] has changed. /// /// This is mostly meant for cases where the cursor changes even if the pointer doesn't diff --git a/masonry/src/widget/widget.rs b/masonry/src/widget/widget.rs index b2793af56..efb927705 100644 --- a/masonry/src/widget/widget.rs +++ b/masonry/src/widget/widget.rs @@ -224,6 +224,8 @@ pub trait Widget: AsAny { /// Return the cursor icon for this widget. /// + /// This will be called when the mouse moves or [`cursor_icon_changed`](MutateCtx::cursor_icon_changed) is called. + /// /// **pos** - the mouse position in global coordinates (e.g. `(0,0)` is the top-left corner of the /// window). fn get_cursor(&self, ctx: &QueryCtx, pos: Point) -> CursorIcon {