Index: gtknotebook.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtknotebook.c,v
retrieving revision 1.229
diff -u -p -r1.229 gtknotebook.c
--- gtknotebook.c	8 Oct 2006 19:00:31 -0000	1.229
+++ gtknotebook.c	2 Nov 2006 13:13:40 -0000
@@ -762,7 +762,7 @@ gtk_notebook_class_init (GtkNotebookClas
   /**
    * GtkNotebook:arrow-spacing:
    *
-   * The "arrow-size" property defines the spacing between the scroll
+   * The "arrow-spacing" property defines the spacing between the scroll
    * arrows and the tabs.
    *
    * Since: 2.10
@@ -1693,16 +1693,25 @@ gtk_notebook_size_request (GtkWidget    
 
   if (notebook->show_border || notebook->show_tabs)
     {
-      widget->requisition.width += widget->style->xthickness * 2;
-      widget->requisition.height += widget->style->ythickness * 2;
-
       if (notebook->show_tabs)
 	{
 	  gint tab_width = 0;
 	  gint tab_height = 0;
 	  gint tab_max = 0;
 	  gint padding;
-	  
+
+	  switch (notebook->tab_pos)
+	    {
+	    case GTK_POS_TOP:
+	    case GTK_POS_BOTTOM:
+	      widget->requisition.height += widget->style->ythickness;
+	      break;
+	    case GTK_POS_LEFT:
+	    case GTK_POS_RIGHT:
+	      widget->requisition.width += widget->style->xthickness;
+	      break;
+	    }
+
 	  for (children = notebook->children; children;
 	       children = children->next)
 	    {
@@ -1934,34 +1943,26 @@ gtk_notebook_size_allocate (GtkWidget   
       child_allocation.width = MAX (1, allocation->width - border_width * 2);
       child_allocation.height = MAX (1, allocation->height - border_width * 2);
 
-      if (notebook->show_tabs || notebook->show_border)
+      if (notebook->show_tabs && notebook->children && notebook->cur_page)
 	{
-	  child_allocation.x += widget->style->xthickness;
-	  child_allocation.y += widget->style->ythickness;
-	  child_allocation.width = MAX (1, child_allocation.width -
-					widget->style->xthickness * 2);
-	  child_allocation.height = MAX (1, child_allocation.height -
-					 widget->style->ythickness * 2);
-
-	  if (notebook->show_tabs && notebook->children && notebook->cur_page)
+	  switch (tab_pos)
 	    {
-	      switch (tab_pos)
-		{
-		case GTK_POS_TOP:
-		  child_allocation.y += notebook->cur_page->requisition.height;
-		case GTK_POS_BOTTOM:
-		  child_allocation.height =
-		    MAX (1, child_allocation.height -
-			 notebook->cur_page->requisition.height);
-		  break;
-		case GTK_POS_LEFT:
-		  child_allocation.x += notebook->cur_page->requisition.width;
-		case GTK_POS_RIGHT:
-		  child_allocation.width =
-		    MAX (1, child_allocation.width -
-			 notebook->cur_page->requisition.width);
-		  break;
-		}
+	    case GTK_POS_TOP:
+	      child_allocation.y += notebook->cur_page->requisition.height +
+		widget->style->ythickness;
+	    case GTK_POS_BOTTOM:
+	      child_allocation.height =
+		MAX (1, child_allocation.height -
+		     notebook->cur_page->requisition.height - widget->style->ythickness);
+	      break;
+	    case GTK_POS_LEFT:
+	      child_allocation.x += notebook->cur_page->requisition.width +
+		widget->style->xthickness;
+	    case GTK_POS_RIGHT:
+	      child_allocation.width =
+		MAX (1, child_allocation.width -
+		     notebook->cur_page->requisition.width - widget->style->xthickness);
+	      break;
 	    }
 	}
 
