diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-05-12 10:19:59 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-05-12 10:19:59 (GMT) |
commit | c22efad906911b3af9dbad0b7a422ad5bdcdf635 (patch) | |
tree | 75f5fb5b0259d2deecde5d4c4bd9add54cea114d | |
parent | f81a810207898013bc1dba138f9ed50cb6d765d6 (diff) |
[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
-rw-r--r-- | libview/ev-view.c | 9 |
1 files changed, 7 insertions, 2 deletions
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); |