[gnome-flashback] desktop-background: fix background flickering



commit e438f1b78ce38c4c05c36d484e8f5176d189fca6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Apr 14 00:45:16 2015 +0300

    desktop-background: fix background flickering

 .../libdesktop-background/desktop-background.c     |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libdesktop-background/desktop-background.c 
b/gnome-flashback/libdesktop-background/desktop-background.c
index b88a274..3ec256f 100644
--- a/gnome-flashback/libdesktop-background/desktop-background.c
+++ b/gnome-flashback/libdesktop-background/desktop-background.c
@@ -394,6 +394,20 @@ size_allocate (GtkWidget     *widget,
                gpointer       user_data)
 {
        DesktopBackground *background = DESKTOP_BACKGROUND (user_data);
+       DesktopBackgroundPrivate *priv = background->priv;
+
+       if (priv->width == allocation->width && priv->height == allocation->height) {
+               GdkWindow *window;
+               cairo_pattern_t *pattern;
+
+               window = gtk_widget_get_window (priv->background);
+               pattern = cairo_pattern_create_for_surface (priv->surface);
+
+               gdk_window_set_background_pattern (window, pattern);
+               cairo_pattern_destroy (pattern);
+
+               return;
+       }
 
        queue_background_change (user_data);
 }


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