[gnome-panel] panel: Fix random grey box on logout



commit 0fa4ad9bffe9f716f37c53fe99a9686ca1d21595
Author: Peter Hurley <peter hurleysoftware com>
Date:   Thu Mar 15 08:28:23 2012 -0400

    panel: Fix random grey box on logout
    
    On session logout, a grey box briefly appears in the upper left corner
    of the screen. This grey box appears because the PanelAppletFrame is
    attempting to notify the user that an applet has died and ask if the
    user would like to restart.
    
    This behavior is triggered by an "applet-broken" signal. This signal is
    generated when, as widgets are being unrealized & disposed from the
    toplevel in panel_shell_quit(), the socket created by
    PanelAppletContainer to track PanelApplet plugs is unrealized which
    causes the socket to generate a "plug-removed" signal.
    
    Don't generate "applet-broken" signal if the socket is unrealized.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672111
    
    Signed-off-by: Peter Hurley <peter hurleysoftware com>

 .../panel-applet-container.c                       |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gnome-panel/libpanel-applet-private/panel-applet-container.c b/gnome-panel/libpanel-applet-private/panel-applet-container.c
index b228479..e18d58e 100644
--- a/gnome-panel/libpanel-applet-private/panel-applet-container.c
+++ b/gnome-panel/libpanel-applet-private/panel-applet-container.c
@@ -243,7 +243,12 @@ panel_applet_container_plug_removed (PanelAppletContainer *container)
 	g_object_unref (container->priv->applet_proxy);
 	container->priv->applet_proxy = NULL;
 
-	g_signal_emit (container, signals[APPLET_BROKEN], 0);
+	/* The "plug-removed" signal is also emitted when the socket is being
+	 * unrealized (eg., when PanelAppletContainer is torn down during
+	 * cleanup on exit). Only emit "applet-broken" if the socket is
+	 * still realized. */
+	if (gtk_widget_get_realized (container->priv->socket))
+		g_signal_emit (container, signals[APPLET_BROKEN], 0);
 
 	/* Continue destroying, in case of reloading
 	 * a new frame widget is created



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