diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-09-17 22:38:50 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-09-17 22:38:50 +0200 |
commit | a91aa0a9e947831f618e4c5e608c56742273d8b9 (patch) | |
tree | 6954ef762d8653b11c1d917927dbe41601b88ef0 /src/slideshow.c | |
parent | 4e90a9c416a66e3ab6170e2a557d8966d93fbbd2 (diff) |
Inhibit screensaver when slideshow is running
Diffstat (limited to 'src/slideshow.c')
-rw-r--r-- | src/slideshow.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slideshow.c b/src/slideshow.c index 4847077..66e4994 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -35,6 +35,7 @@ #include "mainwindow.h" #include "render.h" #include "pr_clock.h" +#include "inhibit_screensaver.h" /* Force a redraw of the slideshow */ @@ -134,6 +135,7 @@ static gint next_slide_sig(GtkWidget *widget, struct presentation *p) void end_slideshow(struct presentation *p) { + if ( p->inhibit != NULL ) do_inhibit(p->inhibit, 0); gtk_widget_destroy(p->ss_drawingarea); gtk_widget_destroy(p->slideshow); p->slideshow = NULL; @@ -223,6 +225,10 @@ void try_start_slideshow(struct presentation *p) p->ss_blank = 0; + if ( p->inhibit == NULL ) { + p->inhibit = inhibit_prepare(); + } + n = gtk_window_new(GTK_WINDOW_TOPLEVEL); p->ss_drawingarea = gtk_drawing_area_new(); @@ -266,6 +272,8 @@ void try_start_slideshow(struct presentation *p) gtk_window_fullscreen(GTK_WINDOW(n)); gtk_widget_show_all(GTK_WIDGET(n)); + if ( p->inhibit != NULL ) do_inhibit(p->inhibit, 1); + //if ( p->prefs->open_notes ) open_notes(p); FIXME! p->cur_proj_slide = p->cur_edit_slide; |