Index: eggtrayicon.c
===================================================================
RCS file: /cvs/gnome/libegg/libegg/tray/eggtrayicon.c,v
retrieving revision 1.8
diff -u -r1.8 eggtrayicon.c
--- eggtrayicon.c	16 Jun 2005 13:27:40 -0000	1.8
+++ eggtrayicon.c	13 Feb 2006 20:48:29 -0000
@@ -67,6 +67,9 @@
 static void egg_tray_icon_realize   (GtkWidget *widget);
 static void egg_tray_icon_unrealize (GtkWidget *widget);
 
+static gboolean egg_tray_icon_expose_event (GtkWidget *widget,
+					    GdkEventExpose *event);
+
 #ifdef GDK_WINDOWING_X11
 static void egg_tray_icon_update_manager_window    (EggTrayIcon *icon,
 						    gboolean     dock_if_realized);
@@ -118,8 +121,9 @@
 
   gobject_class->get_property = egg_tray_icon_get_property;
 
-  widget_class->realize   = egg_tray_icon_realize;
-  widget_class->unrealize = egg_tray_icon_unrealize;
+  widget_class->realize      = egg_tray_icon_realize;
+  widget_class->unrealize    = egg_tray_icon_unrealize;
+  widget_class->expose_event = egg_tray_icon_expose_event;
 
   g_object_class_install_property (gobject_class,
 				   PROP_ORIENTATION,
@@ -367,6 +371,14 @@
 
 #endif
 
+static gboolean
+egg_tray_icon_expose_event (GtkWidget *widget, GdkEventExpose *event)
+{
+  gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+			 event->area.width, event->area.height);
+  return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+}
+
 static void
 egg_tray_icon_realize (GtkWidget *widget)
 {
@@ -410,6 +422,11 @@
   /* Add a root window filter so that we get changes on MANAGER */
   gdk_window_add_filter (root_window,
 			 egg_tray_icon_manager_filter, icon);
+
+  /* Inherit the parent background */
+  gtk_widget_set_app_paintable (widget, TRUE);
+  gtk_widget_set_double_buffered (widget, FALSE);
+  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
 #endif
 }
 
