1 From a0b5fca04da208990f3c40e65dbb045da4cdb35e Mon Sep 17 00:00:00 2001
2 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3 Date: Sun, 20 Mar 2016 13:24:37 +0200
4 Subject: [PATCH] showdesktop: Make sure active state is initialized
6 There are cases (in qemu at least) where set_active()
7 is never called on startup. Make sure we initialize the active
8 state so the icon gets loaded and the applet is not confused
9 about the current state.
11 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
12 Signed-off-by: Ross Burton <ross.burton@intel.com>
15 Upstream-Status: Backport
17 applets/showdesktop/showdesktop.c | 10 ++++++++++
18 1 file changed, 10 insertions(+)
20 diff --git a/applets/showdesktop/showdesktop.c b/applets/showdesktop/showdesktop.c
21 index 61dd5c2..33c13e1 100644
22 --- a/applets/showdesktop/showdesktop.c
23 +++ b/applets/showdesktop/showdesktop.c
24 @@ -181,6 +181,12 @@ button_clicked_cb (GtkButton *button,
29 +realize_cb (GtkWidget *button, ShowDesktopApplet *applet)
31 + sync_applet (applet);
34 G_MODULE_EXPORT GtkWidget *
35 mb_panel_applet_create (const char *id,
36 GtkOrientation orientation)
37 @@ -216,6 +222,10 @@ mb_panel_applet_create (const char *id,
39 G_CALLBACK (button_clicked_cb),
41 + g_signal_connect (button,
43 + G_CALLBACK (realize_cb),
46 g_object_weak_ref (G_OBJECT (button),
47 (GWeakNotify) show_desktop_applet_free,