diff options
Diffstat (limited to 'gtk/gtkplug.c')
-rw-r--r-- | gtk/gtkplug.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index 8a919ef208..e8af9c5f05 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -567,13 +567,18 @@ static gboolean gtk_plug_key_press_event (GtkWidget *widget, GdkEventKey *event) { - if (!GTK_WINDOW (widget)->has_focus) + if (GTK_WIDGET_TOPLEVEL (widget)) { - gtk_plug_forward_key_press (GTK_PLUG (widget), event); - return TRUE; + if (!GTK_WINDOW (widget)->has_focus) + { + gtk_plug_forward_key_press (GTK_PLUG (widget), event); + return TRUE; + } + else + return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event); } else - return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event); + return FALSE; } static void |