[gtk+/gtk-3-20] gtkbindings: Clarify that widgets need has-focus for bindings to work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] gtkbindings: Clarify that widgets need has-focus for bindings to work
- Date: Tue, 6 Sep 2016 12:17:19 +0000 (UTC)
commit 8d059bb4873d9892735920b87534d51ad60c1165
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon Aug 22 17:10:47 2016 +0100
gtkbindings: Clarify that widgets need has-focus for bindings to work
https://bugzilla.gnome.org/show_bug.cgi?id=770242
gtk/gtkbindings.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index 54515d3..f71fcac 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -47,6 +47,12 @@
* with high key binding configurability which requires no application
* or toolkit side changes.
*
+ * In order for bindings to work in a custom widget implementation, the
+ * widget’s #GtkWidget:can-focus and #GtkWidget:has-focus properties
+ * must both be true. For example, by calling gtk_widget_set_can_focus()
+ * in the widget’s initialisation function; and by calling
+ * gtk_widget_grab_focus() when the widget is clicked.
+ *
* # Installing a key binding
*
* A CSS file binding consists of a “binding-set” definition and a match
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]