? applet_default_bg.patch
Index: panel-applet.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/libpanel-applet/panel-applet.c,v
retrieving revision 1.94
diff -u -r1.94 panel-applet.c
--- panel-applet.c	12 Jan 2005 22:29:47 -0000	1.94
+++ panel-applet.c	20 Jan 2005 19:18:03 -0000
@@ -81,6 +81,7 @@
 };
 
 static GObjectClass *parent_class;
+static GObjectClass *parent_parent_class;
 
 enum {
         CHANGE_ORIENT,
@@ -772,11 +773,33 @@
 	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:
+			gtk_style_apply_default_background(widget->style,
+		                                             event->window,
+		                                             TRUE,
+		                                             GTK_STATE_NORMAL,
+		                                             NULL,
+		                                             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;
@@ -1427,6 +1450,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;
 
