[gnome-flashback] desktop: free existing fade data on next change



commit d483f930ae656e7793625aabb985e480cd9f2e37
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Nov 25 23:31:00 2019 +0200

    desktop: free existing fade data on next change
    
    We might need update background before existing fade has finished.
    
    Currently we would hit assert or existing fade would replace new
    background surface with old/previous background surface.
    
    Fix that by simply freeing existing fade before starting new fade
    or creating new background surface.

 gnome-flashback/libdesktop/gf-background.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnome-flashback/libdesktop/gf-background.c b/gnome-flashback/libdesktop/gf-background.c
index 4e95bf6..10d1334 100644
--- a/gnome-flashback/libdesktop/gf-background.c
+++ b/gnome-flashback/libdesktop/gf-background.c
@@ -151,6 +151,8 @@ change (GfBackground *self,
   width = gf_desktop_window_get_width (GF_DESKTOP_WINDOW (self->window));
   height = gf_desktop_window_get_height (GF_DESKTOP_WINDOW (self->window));
 
+  g_clear_pointer (&self->fade_data, free_fade_data);
+
   if (fade)
     {
       FadeData *data;


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