From 7ca0e4e398cea2e93b2597985b9f449d67060a39 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 9 May 2013 23:02:04 +0200 Subject: Make stuff work --- src/slideshow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/slideshow.c') diff --git a/src/slideshow.c b/src/slideshow.c index 0b2b865..6594be8 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -58,7 +58,6 @@ static gint ss_destroy_sig(GtkWidget *widget, struct presentation *p) static gboolean ss_draw_sig(GtkWidget *da, cairo_t *cr, struct presentation *p) { - GtkAllocation allocation; double xoff, yoff; double width, height; @@ -79,9 +78,8 @@ static gboolean ss_draw_sig(GtkWidget *da, cairo_t *cr, struct presentation *p) h = p->proj_slide_width * p->slide_height / p->slide_width; /* Get the overall size */ - gtk_widget_get_allocation(da, &allocation); - xoff = (allocation.width - p->proj_slide_width)/2.0; - yoff = (allocation.height - h)/2.0; + xoff = (width - p->proj_slide_width)/2.0; + yoff = (height - h)/2.0; /* Draw the slide from the cache */ cairo_rectangle(cr, xoff, yoff, p->proj_slide_width, h); @@ -258,6 +256,8 @@ void try_start_slideshow(struct presentation *p) } /* FIXME: Sensible (configurable) choice of monitor */ + rerender_slide(p); + p->slideshow = n; p->slideshow_linked = 1; gtk_window_fullscreen(GTK_WINDOW(n)); -- cgit v1.2.3