[gnome-flashback] desktop: remove icons from removed monitor



commit 06a77a08f9ddd722479a4f3874301d149e46f891
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Feb 9 17:39:21 2020 +0200

    desktop: remove icons from removed monitor

 gnome-flashback/libdesktop/gf-icon-view.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/gnome-flashback/libdesktop/gf-icon-view.c b/gnome-flashback/libdesktop/gf-icon-view.c
index 11f4749..3829d45 100644
--- a/gnome-flashback/libdesktop/gf-icon-view.c
+++ b/gnome-flashback/libdesktop/gf-icon-view.c
@@ -1806,11 +1806,25 @@ monitor_removed_cb (GdkDisplay *display,
                     GfIconView *self)
 {
   GtkWidget *view;
+  GList *l;
 
   view = find_monitor_view_by_monitor (self, monitor);
   if (view == NULL)
     return;
 
+  for (l = self->icons; l != NULL; l = l->next)
+    {
+      GfIconInfo *info;
+
+      info = (GfIconInfo *) l->data;
+
+      if (info->view != view)
+        continue;
+
+      gf_monitor_view_remove_icon (GF_MONITOR_VIEW (view), info->icon);
+      info->view = NULL;
+    }
+
   gtk_widget_destroy (view);
 }
 


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