-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WidgetClassExt::add_binding's callback returns a bool instead of ControlFlow #1505
Comments
@A6GibKm Want to provide a PR? |
It would be nice to check all the subclassing code for cases where we return a boolean as well |
The callback you pass ends up being used for creating a CallbackAction, https://gtk-rs.org/gtk4-rs/git/docs/gtk4/struct.CallbackAction.html#method.new. The callback is a https://docs.gtk.org/gtk4/callback.ShortcutFunc.html and as you can see, |
I would have closed the issue as I don't think we should change the type here but I have noticed few cases in the manual code where it would make more sense to switch to using ControlFlow/Propagation. |
Normally one would return gdk::EVENT_PROPAGATE or gdk::EVENT_STOP in these, but you can't since the later are u32 instead of bool. I think this should retun a glib::ControlFlow.
https://gtk-rs.org/gtk4-rs/git/docs/gtk4/subclass/widget/trait.WidgetClassExt.html#method.add_binding
The text was updated successfully, but these errors were encountered: