Index: eggtrayicon.c
===================================================================
RCS file: /cvs/gnome/libegg/libegg/tray/eggtrayicon.c,v
retrieving revision 1.6
diff -u -8 -p -r1.6 eggtrayicon.c
--- eggtrayicon.c	27 Aug 2004 23:38:19 -0000	1.6
+++ eggtrayicon.c	29 Sep 2004 22:27:17 -0000
@@ -366,16 +366,27 @@ egg_tray_icon_realize (GtkWidget *widget
 
   egg_tray_icon_update_manager_window (icon);
 
   root_window = gdk_screen_get_root_window (screen);
   
   /* Add a root window filter so that we get changes on MANAGER */
   gdk_window_add_filter (root_window,
 			 egg_tray_icon_manager_filter, icon);
+			 
+  /* Make the window inherit the background from its parent window */
+  g_assert(!GTK_WIDGET_NO_WINDOW (widget));
+  /* We need to set as app-paintable, so GTK+ won't insist on drawing
+     the theme background. */
+  gtk_widget_set_app_paintable (widget, TRUE);
+  /* We need to disable double-buffering in order not to have
+     a static black background */
+  gtk_widget_set_double_buffered (widget, FALSE);
+  /* Finally, set the back pixmap to be parent-relative */
+  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
 }
 
 EggTrayIcon *
 egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
 {
   g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
 
   return g_object_new (EGG_TYPE_TRAY_ICON, "screen", screen, "title", name, NULL);
