[gnome-flashback/gnome-3-36] screensaver: fix monitor-removed signal handling



commit 3b9e49f594e9e06ab34a408bcf1d3aa837735643
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Apr 8 20:54:19 2020 +0300

    screensaver: fix monitor-removed signal handling
    
    g_slist_delete_link removes link and frees it. Change it to
    g_slist_remove_link and manually free link after destroying window.
    
    https://gitlab.gnome.org/GNOME/gnome-flashback/-/issues/46

 gnome-flashback/libscreensaver/gf-manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnome-flashback/libscreensaver/gf-manager.c b/gnome-flashback/libscreensaver/gf-manager.c
index 597f8b1..102614e 100644
--- a/gnome-flashback/libscreensaver/gf-manager.c
+++ b/gnome-flashback/libscreensaver/gf-manager.c
@@ -511,8 +511,9 @@ monitor_removed_cb (GdkDisplay *display,
       if (gf_window_get_monitor (GF_WINDOW (l->data)) != monitor)
         continue;
 
-      self->windows = g_slist_delete_link (self->windows, l);
+      self->windows = g_slist_remove_link (self->windows, l);
       gtk_widget_destroy (GTK_WIDGET (l->data));
+      g_slist_free (l);
       break;
     }
 


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