modelbutton: Be focusable

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.
This commit is contained in:
Matthias Clasen 2019-12-27 21:58:54 -05:00
parent 6b89d8a199
commit 28b91a4450

View File

@ -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);