? omf.make
? xmldocs.make
Index: gnome-panel/applet.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/applet.c,v
retrieving revision 1.223
diff -u -r1.223 applet.c
--- gnome-panel/applet.c	19 Sep 2003 03:59:43 -0000	1.223
+++ gnome-panel/applet.c	28 Oct 2003 23:13:39 -0000
@@ -1145,9 +1145,7 @@
 
 	orientation_change (info, panel);
 	size_change (info, panel);
-#ifdef FIXME_FOR_NEW_CONFIG
 	back_change (info, panel);
-#endif
 
 	if (type != PANEL_OBJECT_BONOBO)
 		gtk_widget_grab_focus (applet);
Index: gnome-panel/panel-applet-frame.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-applet-frame.c,v
retrieving revision 1.111
diff -u -r1.111 panel-applet-frame.c
--- gnome-panel/panel-applet-frame.c	6 Oct 2003 13:23:31 -0000	1.111
+++ gnome-panel/panel-applet-frame.c	28 Oct 2003 23:13:47 -0000
@@ -526,6 +526,28 @@
 }
 
 static void
+panel_applet_frame_update_background_size (PanelAppletFrame *frame,
+					   GtkAllocation    *old_allocation,
+					   GtkAllocation    *new_allocation)
+{
+	PanelBackground *background;
+
+	if (old_allocation->x      == new_allocation->x &&
+	    old_allocation->y      == new_allocation->y &&
+	    old_allocation->width  == new_allocation->width &&
+	    old_allocation->height == new_allocation->height)
+		return;
+
+	background = &frame->priv->panel->background;
+
+	if (background->type == PANEL_BACK_NONE ||
+	   (background->type == PANEL_BACK_COLOR && !background->has_alpha))
+		return;
+
+	panel_applet_frame_change_background (frame, background->type);
+}
+
+static void
 panel_applet_frame_size_request (GtkWidget      *widget,
 				 GtkRequisition *requisition)
 {
@@ -576,12 +598,22 @@
 	PanelAppletFrame *frame;
 	GtkBin           *bin;
 	GtkAllocation     new_allocation;
+	GtkAllocation     old_allocation;
+
+	old_allocation.x      = widget->allocation.x;
+	old_allocation.y      = widget->allocation.y;
+	old_allocation.width  = widget->allocation.width;
+	old_allocation.height = widget->allocation.height;
 
 	frame = PANEL_APPLET_FRAME (widget);
 	bin = GTK_BIN (widget);
 
 	if (!frame->priv->has_handle) {
-		GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
+		GTK_WIDGET_CLASS (parent_class)->size_allocate (widget,
+								allocation);
+		panel_applet_frame_update_background_size (frame,
+							   &old_allocation,
+							   allocation);
 		return;
 	}
 
@@ -641,6 +673,10 @@
 		gtk_widget_size_allocate (bin->child, &new_allocation);
   
 	frame->priv->child_allocation = new_allocation;
+
+	panel_applet_frame_update_background_size (frame,
+						   &old_allocation,
+						   allocation);
 }
 
 static inline gboolean
Index: gnome-panel/panel-background.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-background.c,v
retrieving revision 1.12
diff -u -r1.12 panel-background.c
--- gnome-panel/panel-background.c	19 Sep 2003 23:52:15 -0000	1.12
+++ gnome-panel/panel-background.c	28 Oct 2003 23:13:47 -0000
@@ -309,6 +309,8 @@
 
 	panel_background_prepare (background);
 
+	background->notify_changed (background, background->panel);
+
 	return TRUE;
 }
 
@@ -810,9 +812,13 @@
 }
 
 void
-panel_background_init (PanelBackground *background)
+panel_background_init (PanelBackground              *background,
+		       PanelBackgroundChangedNotify  notify_changed,
+		       GtkWidget                    *panel)
 {
 	background->type = PANEL_BACK_NONE;
+	background->notify_changed = notify_changed;
+	background->panel = panel;
 
 	background->color.gdk.red   = 0;
 	background->color.gdk.blue  = 0;
@@ -897,15 +903,14 @@
 	char *retval = NULL;
 
 	if (background->type == PANEL_BACK_IMAGE ||
-	    (background->type == PANEL_BACK_COLOR && background->has_alpha) ||
-	    (background->type == PANEL_BACK_NONE && background->default_pixmap)) {
+	    (background->type == PANEL_BACK_COLOR && background->has_alpha)) {
 		GdkNativeWindow pixmap_xid;
 
-		if (!background->window)
+		if (!background->pixmap)
 			return NULL;
 
 		pixmap_xid = gdk_x11_drawable_get_xid (
-				GDK_DRAWABLE (background->window));
+				GDK_DRAWABLE (background->pixmap));
 
 		retval = g_strdup_printf ("pixmap:%d,%d,%d", pixmap_xid, x, y);
 
Index: gnome-panel/panel-background.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-background.h,v
retrieving revision 1.2
diff -u -r1.2 panel-background.h
--- gnome-panel/panel-background.h	5 Mar 2003 01:11:34 -0000	1.2
+++ gnome-panel/panel-background.h	28 Oct 2003 23:13:47 -0000
@@ -34,9 +34,16 @@
 
 typedef struct _PanelBackground PanelBackground;
 
+typedef void (*PanelBackgroundChangedNotify) 
+				(PanelBackground *background,
+				 gpointer         user_data);
+
 struct _PanelBackground {
 	PanelBackgroundType     type;
 
+	PanelBackgroundChangedNotify notify_changed;
+	GtkWidget              *panel;
+
 	PanelColor              color;
 	char                   *image;
 	GdkPixbuf              *loaded_image; 
@@ -70,7 +77,9 @@
 	guint                   prepared : 1;
 };
 
-void  panel_background_init              (PanelBackground     *background);
+void  panel_background_init              (PanelBackground     *background,
+					  PanelBackgroundChangedNotify notify_changed,
+					  GtkWidget           *panel);
 void  panel_background_free              (PanelBackground     *background);
 void  panel_background_set               (PanelBackground     *background,
 					  PanelBackgroundType  type,
Index: gnome-panel/panel-toplevel.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-toplevel.c,v
retrieving revision 1.39
diff -u -r1.39 panel-toplevel.c
--- gnome-panel/panel-toplevel.c	14 Oct 2003 15:16:24 -0000	1.39
+++ gnome-panel/panel-toplevel.c	28 Oct 2003 23:13:54 -0000
@@ -3305,7 +3305,7 @@
 	   but just a focus in/out, so queue the autohide in that case.
 	   If the pointer is inside the panel then obviously we won't hide */
 	if (toplevel->priv->auto_hide)
-		panel_toplevel_queue_auto_hide (toplevel);
+		panel_toplevel_queue_auto_unhide (toplevel);
 
 	if (GTK_WIDGET_CLASS (parent_class)->focus_in_event)
 		return GTK_WIDGET_CLASS (parent_class)->focus_in_event (widget, event);
Index: gnome-panel/panel-widget.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-widget.c,v
retrieving revision 1.365
diff -u -r1.365 panel-widget.c
--- gnome-panel/panel-widget.c	6 Oct 2003 13:23:31 -0000	1.365
+++ gnome-panel/panel-widget.c	28 Oct 2003 23:13:56 -0000
@@ -33,6 +33,7 @@
 
 enum {
 	SIZE_CHANGE_SIGNAL,
+	BACK_CHANGE_SIGNAL,
 	APPLET_MOVE_SIGNAL,
 	APPLET_ADDED_SIGNAL,
 	APPLET_REMOVED_SIGNAL,
@@ -337,6 +338,17 @@
                               G_TYPE_NONE,
                               0);
 
+	panel_widget_signals[BACK_CHANGE_SIGNAL] =
+                g_signal_new ("back_change",
+                              G_TYPE_FROM_CLASS (object_class),
+                              G_SIGNAL_RUN_LAST,
+                              G_STRUCT_OFFSET (PanelWidgetClass, back_change),
+                              NULL,
+                              NULL, 
+                              panel_marshal_VOID__VOID,
+                              G_TYPE_NONE,
+                              0);
+
 	panel_widget_signals[APPLET_MOVE_SIGNAL] =
                 g_signal_new ("applet_move",
                               G_TYPE_FROM_CLASS (object_class),
@@ -433,6 +445,7 @@
                               0);
 
 	class->size_change = NULL;
+	class->back_change = NULL;
 	class->applet_move = NULL;
 	class->applet_added = NULL;
 	class->applet_removed = NULL;
@@ -1710,7 +1723,9 @@
 	panel->drop_widget   = widget;
 	panel->open_dialogs  = NULL;
 
-	panel_background_init (&panel->background);
+	panel_background_init (&panel->background,
+			       &panel_widget_background_changed,
+			       widget);
 
 	panels = g_slist_append (panels, panel);
 }
@@ -2607,6 +2622,16 @@
 	g_signal_emit (panel_widget, panel_widget_signals [SIZE_CHANGE_SIGNAL], 0);
 
 	gtk_widget_queue_resize (GTK_WIDGET (panel_widget));
+}
+
+void
+panel_widget_background_changed (PanelBackground *background,
+				 gpointer        panel)
+{
+	g_return_if_fail (PANEL_IS_WIDGET (panel));
+	g_signal_emit (G_OBJECT (panel),
+		       panel_widget_signals [BACK_CHANGE_SIGNAL],
+		       0);
 }
 
 static void 
Index: gnome-panel/panel-widget.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-widget.h,v
retrieving revision 1.157
diff -u -r1.157 panel-widget.h
--- gnome-panel/panel-widget.h	6 Oct 2003 13:23:32 -0000	1.157
+++ gnome-panel/panel-widget.h	28 Oct 2003 23:13:56 -0000
@@ -105,6 +105,7 @@
 	GtkFixedClass parent_class;
 
 	void (* size_change) (PanelWidget *panel);
+	void (* back_change) (PanelWidget *panel);
 	void (* applet_move) (PanelWidget *panel,
 			      GtkWidget *applet);
 	void (* applet_added) (PanelWidget *panel,
@@ -163,6 +164,8 @@
 						 GtkOrientation  orientation);
 void            panel_widget_set_size           (PanelWidget    *panel_widget,
 						 int             size);
+void            panel_widget_background_changed (PanelBackground *background,
+						 gpointer        panel);
 
 /*draw EVERYTHING (meaning icons)*/
 void		panel_widget_draw_all		(PanelWidget *panel,
Index: gnome-panel/panel.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel.c,v
retrieving revision 1.527
diff -u -r1.527 panel.c
--- gnome-panel/panel.c	13 Oct 2003 13:03:56 -0000	1.527
+++ gnome-panel/panel.c	28 Oct 2003 23:13:56 -0000
@@ -148,7 +148,6 @@
 			      widget);
 }
 
-#ifdef FIXME_FOR_NEW_CONFIG
 void
 back_change (AppletInfo  *info,
 	     PanelWidget *panel)
@@ -181,7 +180,6 @@
 	update_config_back(PANEL_WIDGET(widget));
 #endif /* FIXME_FOR_NEW_CONFIG */
 }
-#endif
 
 static void
 panel_applet_added(GtkWidget *widget, GtkWidget *applet, gpointer data)
@@ -194,9 +192,7 @@
 
 	orientation_change(info,PANEL_WIDGET(widget));
 	size_change(info,PANEL_WIDGET(widget));
-#ifdef FIXME_FOR_NEW_CONFIG
 	back_change(info,PANEL_WIDGET(widget));
-#endif
 }
 
 static void
@@ -1077,12 +1073,10 @@
 			  "applet_move",
 			  G_CALLBACK(panel_applet_move),
 			  NULL);
-#ifdef FIXME_FOR_NEW_TOPLEVEL
 	g_signal_connect (G_OBJECT (panel),
 			  "back_change",
 			  G_CALLBACK (panel_back_change),
 			  NULL);
-#endif
 	g_signal_connect (G_OBJECT (panel),
 			  "size_change",
 			  G_CALLBACK (panel_size_change),
Index: libpanel-applet/panel-applet.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/libpanel-applet/panel-applet.c,v
retrieving revision 1.82
diff -u -r1.82 panel-applet.c
--- libpanel-applet/panel-applet.c	14 Oct 2003 19:53:49 -0000	1.82
+++ libpanel-applet/panel-applet.c	28 Oct 2003 23:14:30 -0000
@@ -68,8 +68,6 @@
 	guint                       size;
 	char                       *background;
 
-	GdkPixmap                  *bg_pixmap;
-
         int                        *size_hints;
         int                         size_hints_len;
 
@@ -780,24 +778,27 @@
 			 int              x,
 			 int              y)
 {
-	GdkWindow *window;
-	GdkPixmap *retval;
-	GdkGC     *gc;
-	int        width;
-	int        height;
+	GdkPixmap  *pixmap;
+	GdkDisplay *display;
+	GdkPixmap  *retval;
+	GdkGC      *gc;
+	int         width;
+	int         height;
 
 	g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);
 
 	if (!GTK_WIDGET_REALIZED (applet))
 		return NULL;
 
-	window = gdk_window_lookup (xid);
-	if (window)
-		g_object_ref (window);
+	display = gdk_display_get_default ();
+	
+	pixmap = gdk_pixmap_lookup_for_display (display, xid);
+	if (pixmap)
+		g_object_ref (pixmap);
 	else
-		window = gdk_window_foreign_new (xid);
+		pixmap = gdk_pixmap_foreign_new_for_display (display, xid);
 
-	g_return_val_if_fail (window != NULL, NULL);
+	g_return_val_if_fail (pixmap != NULL, NULL);
 
 	gdk_drawable_get_size (GDK_DRAWABLE (GTK_WIDGET (applet)->window),
 			       &width, &height);
@@ -810,13 +811,13 @@
 
 	gdk_draw_drawable (GDK_DRAWABLE (retval),
 			   gc, 
-			   GDK_DRAWABLE (window),
+			   GDK_DRAWABLE (pixmap),
 			   x, y,
 			   0, 0,
 			   width, height);
 
 	g_object_unref (gc);
-	g_object_unref (window);
+	g_object_unref (pixmap);
 
 	return retval;
 }
