summaryrefslogtreecommitdiff
path: root/gtk/gtkwindow.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-03-11 13:47:11 +0100
committerCarlos Garnacho <carlosg@gnome.org>2018-04-05 19:26:54 +0200
commitad5f0a63a3359df23abdd66e3cd01bd02fdd9f82 (patch)
tree832a92e8be082ad19c94655fe06e80627e3b2764 /gtk/gtkwindow.c
parent6892b5c5ba453c9062dae0021e8cafbbcc3970ec (diff)
downloadgtk+-ad5f0a63a3359df23abdd66e3cd01bd02fdd9f82.tar.gz
gtkwindow: Perform key activation in gtk_main_do_event()
In a similar spirit to the previous commit, make window shortcut activation happen by default on toplevels, without relying on legacy controllers.
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r--gtk/gtkwindow.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ffa266b6e8..622477a023 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -431,8 +431,6 @@ static gboolean gtk_window_configure_event (GtkWidget *widget,
GdkEvent *event);
static gboolean gtk_window_event (GtkWidget *widget,
GdkEvent *event);
-static gint gtk_window_key_press_event (GtkWidget *widget,
- GdkEventKey *event);
static void gtk_window_focus_in (GtkWidget *widget);
static void gtk_window_focus_out (GtkWidget *widget);
static void surface_state_changed (GtkWidget *widget);
@@ -804,7 +802,6 @@ gtk_window_class_init (GtkWindowClass *klass)
widget_class->unrealize = gtk_window_unrealize;
widget_class->size_allocate = gtk_window_size_allocate;
widget_class->event = gtk_window_event;
- widget_class->key_press_event = gtk_window_key_press_event;
widget_class->focus = gtk_window_focus;
widget_class->move_focus = gtk_window_move_focus;
widget_class->measure = gtk_window_measure;
@@ -7413,24 +7410,6 @@ gtk_window_propagate_key_event (GtkWindow *window,
return handled;
}
-static gint
-gtk_window_key_press_event (GtkWidget *widget,
- GdkEventKey *event)
-{
- GtkWindow *window = GTK_WINDOW (widget);
- gboolean handled = FALSE;
-
- /* handle mnemonics and accelerators */
- if (!handled)
- handled = gtk_window_activate_key (window, event);
-
- /* Chain up, invokes binding set */
- if (!handled)
- handled = GTK_WIDGET_CLASS (gtk_window_parent_class)->key_press_event (widget, event);
-
- return handled;
-}
-
static GtkWindowRegion
get_active_region_type (GtkWindow *window, gint x, gint y)
{