From 618f1f08ec265b942ca6b0e9fce80abcf8294d6f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 3 Mar 2019 17:42:36 -0500 Subject: [PATCH] main: guard window-specific code paths This was overlooked when I first tried to make things for GtkRoot. --- gtk/gtkmain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index d4d79f650e..e7d423e4a6 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1859,6 +1859,7 @@ gtk_main_do_event (GdkEvent *event) GtkWidget *focus_widget; if (event->any.type == GDK_KEY_PRESS && + GTK_IS_WINDOW (target_widget) && gtk_window_activate_key (GTK_WINDOW (target_widget), (GdkEventKey *) event)) goto cleanup;