[eog] Delete SVG background when changing transparency settings



commit 6d72a53126dd881fac55280b27b06be659335696
Author: Felix Riemann <friemann gnome org>
Date:   Thu Jun 3 23:01:34 2010 +0200

    Delete SVG background when changing transparency settings
    
    This has it recreated with the correct transparency settings on the next
    redraw (which is triggered directly afterwards). Fixes wrong SVG display
    when changing the transparency settings with an image loaded.

 src/eog-scroll-view.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index ab35f42..d258739 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -1958,6 +1958,11 @@ eog_scroll_view_set_transparency (EogScrollView *view, EogTransparencyStyle styl
 	}
 
 	if (changed && priv->pixbuf != NULL && gdk_pixbuf_get_has_alpha (priv->pixbuf)) {
+		if (priv->background_surface) {
+			cairo_surface_destroy (priv->background_surface);
+			/* Will be recreated if needed during redraw */
+			priv->background_surface = NULL;
+		}
 		gtk_widget_queue_draw (GTK_WIDGET (priv->display));
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]