projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b89d8a
)
modelbutton: Be focusable
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 28 Dec 2019 02:58:54 +0000
(21:58 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 28 Dec 2019 02:58:54 +0000
(21:58 -0500)
This got lost when modelbuttons stopped being
derived from buttons. It is necessary, since
the GTK focus machinery takes this flag seriously
nowadays, and won't let us grab focus to non-focusable
widgets.
gtk/gtkmodelbutton.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmodelbutton.c
b/gtk/gtkmodelbutton.c
index b40b30c9cea2040b19207ab8b16fed9519bccaf9..36d4105fea1085473c440db7a051d4b1daf125dc 100644
(file)
--- a/
gtk/gtkmodelbutton.c
+++ b/
gtk/gtkmodelbutton.c
@@
-1378,6
+1378,8
@@
gtk_model_button_init (GtkModelButton *self)
GtkEventController *controller;
GtkGesture *gesture;
+ gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
+
self->role = GTK_BUTTON_ROLE_NORMAL;
self->label = gtk_label_new ("");
gtk_widget_set_halign (self->label, GTK_ALIGN_START);