After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770242 - gtkbindings: Clarify that widgets need has-focus for bindings to work
gtkbindings: Clarify that widgets need has-focus for bindings to work
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-08-22 16:11 UTC by Philip Withnall
Modified: 2016-08-22 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkbindings: Clarify that widgets need has-focus for bindings to work (1.09 KB, patch)
2016-08-22 16:11 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2016-08-22 16:11:17 UTC
Trivial patch.
Comment 1 Philip Withnall 2016-08-22 16:11:21 UTC
Created attachment 333924 [details] [review]
gtkbindings: Clarify that widgets need has-focus for bindings to work
Comment 2 Carlos Garnacho 2016-08-22 16:40:31 UTC
Review of attachment 333924 [details] [review]:

::: gtk/gtkbindings.c
@@ +53,3 @@
+ * in the widget’s initialisation function; and by calling
+ * gtk_widget_grab_focus() when the widget is clicked, or on application
+ * startup.

I'd maybe drop the "or on application startup" part, I think it's rather uncommon to grab focus without prior interaction (initial focus after show() being an exception I guess, but also the focus chain takes care of it usually).

Looks good to me otherwise :), feel free to push afterwards.
Comment 3 Philip Withnall 2016-08-22 17:07:14 UTC
Dropped that bit as suggested. Thanks for the fast review!

Attachment 333924 [details] pushed as 92a95c7 - gtkbindings: Clarify that widgets need has-focus for bindings to work