From 09b3cdd1b0aa60e70b6d57b9efcb9cfee5e8f923 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 14 Nov 2009 13:48:23 +0100 Subject: [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 file changed, 3 insertions(+) diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c index d278397c..6cd974f5 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; } -- cgit v1.2.1