Index: libpanel-applet/panel-applet.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/libpanel-applet/panel-applet.c,v
retrieving revision 1.101
diff -u -r1.101 panel-applet.c
--- libpanel-applet/panel-applet.c	9 Jan 2006 20:00:29 -0000	1.101
+++ libpanel-applet/panel-applet.c	14 Jul 2006 13:30:35 -0000
@@ -86,6 +86,7 @@
 };
 
 static GObjectClass *parent_class;
+static GObjectClass *parent_parent_class;
 
 enum {
         CHANGE_ORIENT,
@@ -793,11 +794,30 @@
 	int border_width;
 	int focus_width = 0;
 	int x, y, width, height;
+	GdkColor color;
+	GdkPixmap *pixmap = NULL;
 
+	PanelAppletBackgroundType type = PANEL_NO_BACKGROUND;
 	g_return_val_if_fail (PANEL_IS_APPLET (widget), FALSE);
 	g_return_val_if_fail (event != NULL, FALSE);
 
-	GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+	type = panel_applet_get_background(PANEL_APPLET(widget), &color, &pixmap);
+	switch (type) {
+		case PANEL_COLOR_BACKGROUND:
+		case PANEL_PIXMAP_BACKGROUND:
+		{
+			gdk_draw_drawable(event->window,widget->style->bg_gc[GTK_STATE_NORMAL], pixmap, 0, 0, 0, 0, 
+						widget->allocation.width, widget->allocation.height);
+
+			GTK_WIDGET_CLASS (parent_parent_class)->expose_event (widget, event);	
+		}
+			break;
+
+		case PANEL_NO_BACKGROUND:
+		default:
+			GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+			break;
+	}
 
         if (!GTK_WIDGET_HAS_FOCUS (widget))
 		return FALSE;
@@ -1159,12 +1179,6 @@
 		gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color);
 		break;
 	case PANEL_PIXMAP_BACKGROUND:
-		style = gtk_style_copy (widget->style);
-		if (style->bg_pixmap[GTK_STATE_NORMAL])
-			g_object_unref (style->bg_pixmap[GTK_STATE_NORMAL]);
-		style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref (pixmap);
-		gtk_widget_set_style (widget, style);
-		g_object_unref (style);
 		break;
 	default:
 		g_assert_not_reached ();
@@ -1515,6 +1529,7 @@
 	GtkBindingSet *binding_set;
 
 	parent_class = g_type_class_peek_parent (klass);
+	parent_parent_class = g_type_class_peek_parent (parent_class);
 
 	klass->move_focus_out_of_applet = panel_applet_move_focus_out_of_applet;
 
