I’m building a widget using the master branch of Iced, and for some reason mouse_interaction isn’t getting called as expected.
With a bit of print debugging, I can see that Widget::update
is called whenever any event in my GUI fires. So far, so good. However, Widget::mouse_interaction
is only called when either: the widget in question handles an event (just a simple click event, in this case) or when some other widget in the GUI handles an interaction.
I can “fix” this by placing shell::invalidate_widgets()
at the top of my Widget::update
method, but that doesn’t quite seem right*, and I don’t see the built-in widgets doing that.
Am I missing/misunderstanding something here?
*Edit: for one, I notice it causes a full re-layout to run on every event, according to the Comet debug metrics