Index: gtkfixed.c
===================================================================
--- gtkfixed.c	(revision 18520)
+++ gtkfixed.c	(working copy)
@@ -35,6 +35,12 @@
   CHILD_PROP_Y
 };
 
+static void gtk_fixed_child_invalidate (GtkWidget       *fixed,
+                                        GtkWidget       *widget,
+                                        GtkFixedChild   *old_child,
+                                        GtkFixedChild   *child);
+static void gtk_fixed_child_allocate (GtkWidget       *fixed,
+                                      GtkFixedChild   *child);
 static void gtk_fixed_realize       (GtkWidget        *widget);
 static void gtk_fixed_size_request  (GtkWidget        *widget,
 				     GtkRequisition   *requisition);
@@ -167,6 +173,54 @@
   fixed->children = g_list_append (fixed->children, child_info);
 }
 
+static void 
+gtk_fixed_child_allocate (GtkWidget       *fixed,
+                          GtkFixedChild   *child)
+{
+  GtkRequisition child_requisition;
+  GtkAllocation child_allocation;
+  guint16 border_width;
+
+  border_width = GTK_CONTAINER (fixed)->border_width;
+  
+  gtk_widget_get_child_requisition (child->widget, &child_requisition);
+  
+  child_allocation.x = child->x + border_width;
+  child_allocation.y = child->y + border_width;
+  
+  if (GTK_WIDGET_NO_WINDOW (fixed))
+    {          
+      child_allocation.x += GTK_WIDGET (fixed)->allocation.x;
+      child_allocation.y += GTK_WIDGET (fixed)->allocation.y;
+    }
+  
+  child_allocation.width = child_requisition.width;
+  child_allocation.height = child_requisition.height;
+  gtk_widget_size_allocate (child->widget, &child_allocation);
+}
+
+static void 
+gtk_fixed_child_invalidate (GtkWidget       *fixed,
+                            GtkWidget       *widget,
+                            GtkFixedChild   *old_child,
+                            GtkFixedChild   *child)
+{
+  if (((old_child->x+widget->allocation.width) >=
+       (fixed->requisition.width)) ||
+      ((old_child->y+widget->allocation.height) >=
+       (fixed->requisition.height)))
+    {
+      gtk_widget_queue_resize (fixed);
+    }
+  else
+    {
+      if (child)
+        gtk_fixed_child_allocate (fixed, child);
+      
+      gdk_window_invalidate_rect (widget->window, NULL, TRUE);
+    }
+}
+
 static void
 gtk_fixed_move_internal (GtkFixed       *fixed,
                          GtkWidget      *widget,
@@ -176,6 +230,7 @@
                          gint            y)
 {
   GtkFixedChild *child;
+  GtkFixedChild old_child;
   
   g_return_if_fail (GTK_IS_FIXED (fixed));
   g_return_if_fail (GTK_IS_WIDGET (widget));
@@ -187,6 +242,8 @@
 
   gtk_widget_freeze_child_notify (widget);
   
+  old_child = *child;
+
   if (change_x)
     {
       child->x = x;
@@ -202,7 +259,10 @@
   gtk_widget_thaw_child_notify (widget);
   
   if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (fixed))
-    gtk_widget_queue_resize (GTK_WIDGET (fixed));
+    gtk_fixed_child_invalidate (GTK_WIDGET (fixed),
+                                widget,
+                                &old_child,
+                                child);
 }
 
 void
@@ -342,8 +402,6 @@
 {
   GtkFixed *fixed;
   GtkFixedChild *child;
-  GtkAllocation child_allocation;
-  GtkRequisition child_requisition;
   GList *children;
   guint16 border_width;
 
@@ -370,21 +428,7 @@
       children = children->next;
       
       if (GTK_WIDGET_VISIBLE (child->widget))
-	{
-	  gtk_widget_get_child_requisition (child->widget, &child_requisition);
-	  child_allocation.x = child->x + border_width;
-	  child_allocation.y = child->y + border_width;
-
-	  if (GTK_WIDGET_NO_WINDOW (widget))
-	    {
-	      child_allocation.x += widget->allocation.x;
-	      child_allocation.y += widget->allocation.y;
-	    }
-	  
-	  child_allocation.width = child_requisition.width;
-	  child_allocation.height = child_requisition.height;
-	  gtk_widget_size_allocate (child->widget, &child_allocation);
-	}
+        gtk_fixed_child_allocate (widget, child);
     }
 }
 
@@ -414,15 +458,18 @@
 	{
 	  gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
 	  
+          if (was_visible && GTK_WIDGET_VISIBLE (container))
+            gtk_fixed_child_invalidate (GTK_WIDGET (container),
+                                        widget,
+                                        child,
+                                        NULL);
+
 	  gtk_widget_unparent (widget);
 
 	  fixed->children = g_list_remove_link (fixed->children, children);
 	  g_list_free (children);
 	  g_free (child);
 
-	  if (was_visible && GTK_WIDGET_VISIBLE (container))
-	    gtk_widget_queue_resize (GTK_WIDGET (container));
-
 	  break;
 	}
 
