From: Carlos Garcia Campos Date: Tue, 12 May 2009 10:19:59 +0000 (+0200) Subject: [libview] Do not handle key events in EvView when it's not focused X-Git-Tag: EVINCE_2_27_1~23 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=c22efad906911b3af9dbad0b7a422ad5bdcdf635;p=evince.git [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 60a58af8..6b030553 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);