File 0001-Fix-overwriting-of-slides-in-speaker-screen.patch of Package pinpoint

From c28a2043a64afced8f5b2a26df9a1b14d2d40ce0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Fri, 27 Jan 2012 12:16:31 +0100
Subject: [PATCH] Fix overwriting of slides in speaker screen

The prev/current/next slide preview in the speaker screen overwrites
screens when moving forward/backward through the slides. The result
looks like all slides stacked with transparent background.

Apparently this happens only for text, full-scale background graphics
are rendered correctly (i.e. non-transparent).

This commit fixes this behaviour by drawing a black background before
rendering the prev/current/next slide preview.
---
 pp-cairo.c   |    8 ++++++++
 pp-clutter.c |    4 ++++
 2 files changed, 12 insertions(+)

diff --git a/pp-cairo.c b/pp-cairo.c
index 5ee7f21..4d36a8b 100644
--- a/pp-cairo.c
+++ b/pp-cairo.c
@@ -511,6 +511,14 @@ out:
 }
 
 void
+cairo_renderer_clear_page (CairoRenderer *renderer)
+{
+  cairo_set_source_rgb(renderer->ctx, 0.0, 0.0, 0.0);
+  cairo_paint(renderer->ctx);
+  cairo_show_page (renderer->ctx);
+}
+
+void
 cairo_renderer_render_page (CairoRenderer *renderer,
                             PinPointPoint *point)
 {
diff --git a/pp-clutter.c b/pp-clutter.c
index 03eb867..1d74337 100644
--- a/pp-clutter.c
+++ b/pp-clutter.c
@@ -50,6 +50,7 @@ void cairo_renderer_set_cr (PinPointRenderer *pp_renderer,
 
 void cairo_renderer_render_page (void          *renderer,
                                  PinPointPoint *point);
+void cairo_renderer_clear_page (void          *renderer);
 
 /* #define QUICK_ACCESS_LEFT - uncomment to move speed access from top to left,
  *                             useful on meego netbook
@@ -1871,6 +1872,7 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
         cairo_renderer_set_cr (renderer->cairo_renderer,
                                cr, clutter_actor_get_width (renderer->speaker_prev),
                                clutter_actor_get_height (renderer->speaker_prev));
+        cairo_renderer_clear_page(renderer->cairo_renderer);
         if (pp_slidep->prev)
           cairo_renderer_render_page (renderer->cairo_renderer,
                                       pp_slidep->prev->data);
@@ -1885,6 +1887,7 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
         cairo_renderer_set_cr (renderer->cairo_renderer,
                                cr, clutter_actor_get_width (renderer->speaker_current),
                                clutter_actor_get_height (renderer->speaker_current));
+        cairo_renderer_clear_page(renderer->cairo_renderer);
         cairo_renderer_render_page (renderer->cairo_renderer,
                                     pp_slidep->data);
         cairo_renderer_unset_cr (renderer->cairo_renderer);
@@ -1895,6 +1898,7 @@ static gboolean update_speaker_screen (ClutterRenderer *renderer)
         cairo_renderer_set_cr (renderer->cairo_renderer,
                                cr, clutter_actor_get_width (renderer->speaker_next),
                                clutter_actor_get_height (renderer->speaker_next));
+        cairo_renderer_clear_page(renderer->cairo_renderer);
         if (pp_slidep->next)
           cairo_renderer_render_page (renderer->cairo_renderer,
                                       pp_slidep->next->data);
-- 
1.7.10.4
openSUSE Build Service is sponsored by