1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
--- applets/notification_area/main.c.orig Wed Dec 28 22:15:27 2005
+++ applets/notification_area/main.c Mon May 15 01:36:01 2006
@@ -159,14 +159,24 @@
tray = all_trays->data;
gtk_box_pack_end (GTK_BOX (tray->box), icon, FALSE, FALSE, 0);
-
+
+ gtk_widget_hide (tray->box);
gtk_widget_show (icon);
+ gtk_widget_show (tray->box);
}
static void
tray_removed (EggTrayManager *manager, GtkWidget *icon, void *data)
{
+ SystemTray *tray;
+
+ if (all_trays == NULL)
+ return;
+
+ tray = all_trays->data;
+ gtk_widget_hide (tray->box);
+ gtk_widget_show (tray->box);
}
static void
@@ -207,9 +217,32 @@
gtk_widget_set_size_request (tray->box, -1, MIN_BOX_SIZE);
break;
}
+
+ /* Force the icons to redraw their backgrounds.
+ * gtk_widget_queue_draw() doesn't work across process boundaries,
+ * so we do this instead.
+ */
+ gtk_widget_hide (tray->box);
+ gtk_widget_show (tray->box);
}
static void
+applet_change_background (PanelApplet *applet,
+ PanelAppletBackgroundType type,
+ GdkColor *color,
+ GdkPixmap *pixmap,
+ SystemTray *tray)
+{
+ /* Force the icons to redraw their backgrounds.
+ * gtk_widget_queue_draw() doesn't work across process boundaries,
+ * so we do this instead.
+ */
+ gtk_widget_hide (tray->box);
+ gtk_widget_show (tray->box);
+}
+
+
+static void
applet_change_orientation (PanelApplet *applet,
PanelAppletOrient orient,
SystemTray *tray)
@@ -332,6 +365,11 @@
g_signal_connect (G_OBJECT (tray->applet),
"change_orient",
G_CALLBACK (applet_change_orientation),
+ tray);
+
+ g_signal_connect (G_OBJECT (tray->applet),
+ "change_background",
+ G_CALLBACK (applet_change_background),
tray);
g_signal_connect (tray->applet,
|