summaryrefslogtreecommitdiff
path: root/gtk/gtkshortcutsshortcut.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-08 07:43:28 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-09 17:50:29 -0400
commit632524f67954d84e8778b7ce2f2b9c24673b54d8 (patch)
tree2e26d60390c41ebec3cc3b324892f73aee08f54c /gtk/gtkshortcutsshortcut.c
parent22e1827f840044ac19c5a090af8511fe37ffcab7 (diff)
downloadgtk+-632524f67954d84e8778b7ce2f2b9c24673b54d8.tar.gz
Reinstate expected focus behavior
After the :can-focus change in the previous commit, widgets need to set suitable focus and grab_focus implementations to implement the desired focus behavior. This commit does that for all widgets.
Diffstat (limited to 'gtk/gtkshortcutsshortcut.c')
-rw-r--r--gtk/gtkshortcutsshortcut.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkshortcutsshortcut.c b/gtk/gtkshortcutsshortcut.c
index 0aea8286d0..95407986b1 100644
--- a/gtk/gtkshortcutsshortcut.c
+++ b/gtk/gtkshortcutsshortcut.c
@@ -25,6 +25,7 @@
#include "gtkintl.h"
#include "gtklabel.h"
#include "gtkprivate.h"
+#include "gtkwidgetprivate.h"
#include "gtkshortcutlabel.h"
#include "gtkshortcutswindowprivate.h"
#include "gtksizegroup.h"
@@ -547,6 +548,8 @@ gtk_shortcuts_shortcut_class_init (GtkShortcutsShortcutClass *klass)
widget_class->measure = gtk_shortcuts_shortcut_measure;
widget_class->snapshot = gtk_shortcuts_shortcut_snapshot;
widget_class->size_allocate = gtk_shortcuts_shortcut_size_allocate;
+ widget_class->grab_focus = gtk_widget_grab_focus_none;
+ widget_class->focus = gtk_widget_focus_none;
/**
* GtkShortcutsShortcut:accelerator: