From c22efad906911b3af9dbad0b7a422ad5bdcdf635 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Tue, 12 May 2009 10:19:59 +0000 Subject: [libview] Do not handle key events in EvView when it's not focused We only handle key events in EvView even when it doesn't have the focus if there is a popup window with the focus --- diff --git a/libview/ev-view.c b/libview/ev-view.c index 60a58af..6b03055 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -3800,7 +3800,7 @@ ev_view_key_press_event (GtkWidget *widget, if (!view->document) return FALSE; - if (!view->presentation) { + if (!GTK_WIDGET_HAS_FOCUS (widget)) { /* Forward key events to current focused window child */ if (view->window_child_focus) { GdkEventKey *new_event; @@ -3815,7 +3815,12 @@ ev_view_key_press_event (GtkWidget *widget, return handled; } - } else if (view->presentation_state == EV_PRESENTATION_END) + + return FALSE; + } + + if (!view->presentation || + view->presentation_state == EV_PRESENTATION_END) return gtk_bindings_activate_event (GTK_OBJECT (widget), event); -- cgit v0.9.1