Index: foobar-widget.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/foobar-widget.c,v
retrieving revision 1.167.2.3
diff -u -r1.167.2.3 foobar-widget.c
--- foobar-widget.c	12 Sep 2002 03:27:44 -0000	1.167.2.3
+++ foobar-widget.c	17 Oct 2002 12:11:35 -0000
@@ -50,7 +50,9 @@
 static void foobar_widget_realize	(GtkWidget *w);
 static void foobar_widget_destroy	(GtkObject *o);
 static void foobar_widget_size_allocate	(GtkWidget *w,
-					 GtkAllocation *alloc);
+					 GtkAllocation *allocation);
+static void foobar_widget_size_request 	(GtkWidget *w,
+					 GtkRequisition *req);
 static gboolean foobar_leave_notify	(GtkWidget *widget,
 					 GdkEventCrossing *event);
 static gboolean foobar_enter_notify	(GtkWidget *widget,
@@ -112,6 +114,7 @@
 
 	widget_class->realize = foobar_widget_realize;
 	widget_class->size_allocate = foobar_widget_size_allocate;
+	widget_class->size_request = foobar_widget_size_request;
 	widget_class->enter_notify_event = foobar_enter_notify;
 	widget_class->leave_notify_event = foobar_leave_notify;
 
@@ -811,18 +814,32 @@
 }
 
 static void
-foobar_widget_size_allocate (GtkWidget *w, GtkAllocation *alloc)
+foobar_widget_size_allocate (GtkWidget *w, GtkAllocation *allocation)
 {
-	if (GTK_WIDGET_CLASS (foobar_widget_parent_class)->size_allocate)
-		GTK_WIDGET_CLASS (foobar_widget_parent_class)->size_allocate (w, alloc);
+        GtkRequisition chreq;
+	gint16 max;
+
+	FoobarWidget *foobar = FOOBAR_WIDGET (w);
+
+        gtk_widget_size_request (foobar->ebox, &chreq);
+
+	/* FIXME: Not sure why we're getting something totally wrong
+	   for the width size request 
+         allocation->width = chreq.width; */
+
+        allocation->height = chreq.height;
+
+        w->allocation = *allocation;
+
+        gtk_widget_size_allocate (foobar->ebox, allocation);
 
 	if (GTK_WIDGET_REALIZED (w)) {
 		FoobarWidget *foo = FOOBAR_WIDGET (w);
 		xstuff_set_pos_size (w->window,
 				     multiscreen_x (foo->screen),
 				     multiscreen_y (foo->screen),
-				     alloc->width,
-				     alloc->height);
+				     allocation->width,
+				     allocation->height);
 
 		g_slist_foreach (panel_list, queue_panel_resize, NULL);
 		basep_border_queue_recalc (foo->screen);
@@ -830,10 +847,25 @@
 		xstuff_set_wmspec_strut (w->window,
 					 0 /* left */,
 					 0 /* right */,
-					 alloc->height /* top */,
+					 allocation->height /* top */,
 					 0 /* bottom */);
 	}
 }
+
+static void
+foobar_widget_size_request (GtkWidget *widget,
+                            GtkRequisition *req)
+{
+        GtkRequisition chreq;
+
+        FoobarWidget *foo= FOOBAR_WIDGET(widget);
+
+        gtk_widget_size_request (foo->ebox, &chreq);
+
+        req->width = chreq.width;
+        req->height = chreq.height;
+}
+
 
 GtkWidget *
 foobar_widget_new (const char *panel_id,
