? .eggtraymanager.c.swp
? .main.c.swp
? transparency.patch
Index: main.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/notification_area/main.c,v
retrieving revision 1.30
diff -u -p -r1.30 main.c
--- main.c	28 Dec 2005 21:15:27 -0000	1.30
+++ main.c	3 Mar 2006 18:28:53 -0000
@@ -147,8 +147,34 @@ static const BonoboUIVerb menu_verbs [] 
   BONOBO_UI_UNSAFE_VERB ("SystemTrayAbout",      about_cb),
   BONOBO_UI_VERB_END
 };
+static gboolean
+transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+{
+	g_print("expose\n");
+  gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+			 event->area.width, event->area.height);
+  return FALSE;
+}
 
 static void
+make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
+			gpointer user_data)
+{
+	g_print("transparent\n");
+  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+}
+
+static void
+make_transparent (GtkWidget *widget, gpointer user_data)
+{
+  if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
+    return;
+
+  gtk_widget_set_app_paintable (widget, TRUE);
+  gtk_widget_set_double_buffered (widget, FALSE);
+  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+}	
+static void
 tray_added (EggTrayManager *manager, GtkWidget *icon, void *data)
 {
   SystemTray *tray;
@@ -158,6 +184,13 @@ tray_added (EggTrayManager *manager, Gtk
   
   tray = all_trays->data;
 
+  g_signal_connect (icon, "realize",
+		    G_CALLBACK (make_transparent), NULL);
+
+  g_signal_connect (tray->box, "expose_event",
+		    G_CALLBACK (transparent_expose_event), NULL);
+  g_signal_connect_after (tray->box, "style_set",
+			  G_CALLBACK (make_transparent_again), NULL);
   gtk_box_pack_end (GTK_BOX (tray->box), icon, FALSE, FALSE, 0);
   
   gtk_widget_show (icon);
