Conversation
- realize - unrealize - map - unmap - motion_notify_event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me apart from the mutable reference :) The event is not mutable, it's created and then not to be changed anymore.
I've applied the suggested changes and renamed a variable for clarity. The CI came up red before because of what looked like a network error to me. I just wanted to mention that too. |
Happens :) |
src/subclass/widget.rs
Outdated
let f = (*parent_class) | ||
.realize | ||
.expect("No parent class impl for \"realize\""); | ||
f(widget.to_glib_none().0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let f = (*parent_class) | |
.realize | |
.expect("No parent class impl for \"realize\""); | |
f(widget.to_glib_none().0) | |
if let Some(f) = (*parent_class).realize { | |
f(widget.to_glib_none().0); | |
} |
And the same for unrealize, map, unmap and motion_notify_event. They're all optional and nothing bad (and nothing at all) happens when they are not set.
For the motion_notify_event, see the other _event impls for what to do about the return value
@GuillaumeGomez good to go once the CI is happy :) Thanks @tsahyt ! |
@GuillaumeGomez time to merge :) |
These are some vfuncs that I previously added manually into my subclasses and are still missing.
I've verified that realize and unrealize work as intended. Map and unmap are mostly the same, and should work. I'm not entirely sure about motion_notify_event however, in particular about passing the second argument and whether it should really be mutable.