summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2009-11-14 13:48:23 +0100
committerJens Granseuer <jensgr@gmx.net>2009-11-14 13:52:21 +0100
commit09b3cdd1b0aa60e70b6d57b9efcb9cfee5e8f923 (patch)
tree5c9c27585b578bb32da6cb1ab5407da1ede94a64
parent90f09af5607b27ed7f72ace0a4891d50d85b6586 (diff)
downloadgnome-settings-daemon-09b3cdd1b0aa60e70b6d57b9efcb9cfee5e8f923.tar.gz
[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.
-rw-r--r--plugins/xrandr/gsd-xrandr-manager.c3
1 files changed, 3 insertions, 0 deletions
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;
}