[gnome-settings-daemon/gnome-2-28] [xrandr] Hide the status icon before unreffing it



commit 09b3cdd1b0aa60e70b6d57b9efcb9cfee5e8f923
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Nov 14 13:48:23 2009 +0100

    [xrandr] Hide the status icon before unreffing it
    
    Due to a bug in the notification area, repeatedly showing and hiding the
    display status icon leaks whitespace in the notification area. This can be
    avoided by hiding the icon before unreffing it.
    
    Closes bug #601696.

 plugins/xrandr/gsd-xrandr-manager.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index d278397..6cd974f 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -1793,6 +1793,9 @@ status_icon_stop (GsdXrandrManager *manager)
                 g_signal_handlers_disconnect_by_func (
                         priv->status_icon, G_CALLBACK (status_icon_popup_menu_cb), manager);
 
+                /* hide the icon before unreffing it; otherwise we will leak
+                   whitespace in the notification area due to a bug in there */
+                gtk_status_icon_set_visible (priv->status_icon, FALSE);
                 g_object_unref (priv->status_icon);
                 priv->status_icon = NULL;
         }



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