From e3e44ba2210a4a179df191ded705aad443832fa6 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Fri, 28 Sep 2012 15:37:00 +0200 Subject: [PATCH] prevent non-gtk-systray-icons from disappearing on redisplay --- src/cinnamon-gtk-embed.c | 5 +++-- src/cinnamon-tray-manager.c | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cinnamon-gtk-embed.c b/src/cinnamon-gtk-embed.c index 37a03a9380..7dfe6f0b89 100644 --- a/src/cinnamon-gtk-embed.c +++ b/src/cinnamon-gtk-embed.c @@ -212,8 +212,9 @@ static void cinnamon_gtk_embed_unrealize (ClutterActor *actor) { CinnamonGtkEmbed *embed = CINNAMON_GTK_EMBED (actor); - - _cinnamon_embedded_window_unrealize (embed->priv->window); + + if (embed->priv->window) + _cinnamon_embedded_window_unrealize (embed->priv->window); CLUTTER_ACTOR_CLASS (cinnamon_gtk_embed_parent_class)->unrealize (actor); } diff --git a/src/cinnamon-tray-manager.c b/src/cinnamon-tray-manager.c index 4439f022b8..7d5863c179 100644 --- a/src/cinnamon-tray-manager.c +++ b/src/cinnamon-tray-manager.c @@ -350,10 +350,12 @@ cinnamon_tray_manager_child_redisplay (gpointer socket_pointer, gpointer child_p CinnamonTrayManagerChild *child = child_pointer; g_return_if_fail(child != NULL); - g_return_if_fail(GTK_IS_WIDGET(child->window)); - gtk_widget_unrealize(child->window); - gtk_widget_realize(child->window); + if (child->actor && CLUTTER_IS_ACTOR(child->actor)) { + clutter_actor_destroy(child->actor); + } + + on_plug_added(socket_pointer, child->manager); } void cinnamon_tray_manager_redisplay (CinnamonTrayManager *manager)