diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index c54e6f1..cbc0014 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -276,8 +276,6 @@ static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, { gboolean r; - if ( p->editing_object == NULL ) return FALSE; - /* Throw the event to the IM context and let it sort things out */ r = gtk_im_context_filter_keypress(GTK_IM_CONTEXT(p->im_context), event); @@ -304,6 +302,18 @@ static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, } } + switch ( event->keyval ) { + + case GDK_KEY_Page_Up : + prev_slide_sig(NULL, p); + break; + + case GDK_KEY_Page_Down : + next_slide_sig(NULL, p); + break; + + } + /* FIXME: Invalidate only the necessary region */ gdk_window_invalidate_rect(p->drawingarea->window, NULL, FALSE); @@ -488,6 +498,8 @@ int open_mainwindow(struct presentation *p) assert(p->num_slides > 0); check_redraw_slide(p->view_slide); + gtk_widget_grab_focus(GTK_WIDGET(p->drawingarea)); + gtk_widget_show_all(window); return 0; } |