--- gtk+-2.0.8/gtk/gtkwidget.c	Sun Nov  3 18:27:59 2002
+++ gtk+-2.0.8.new/gtk/gtkwidget.c	Sun Nov 10 21:26:47 2002
@@ -1447,6 +1447,24 @@
 				 widget->allocation.height);
 }
 
+static void
+reset_state_recurse (GtkWidget *widget,
+                     gpointer   data)
+{
+  if (GTK_IS_CONTAINER (widget))
+    {
+      GtkContainer *container;
+
+      container = GTK_CONTAINER (widget);
+
+      gtk_container_foreach (container,
+                             reset_state_recurse,
+                             NULL);
+    }
+
+  gtk_widget_set_state (widget, GTK_STATE_NORMAL);
+}
+
 /**
  * gtk_widget_unparent:
  * @widget: a #GtkWidget
@@ -1472,6 +1490,10 @@
   g_object_freeze_notify (G_OBJECT (widget));
   nqueue = g_object_notify_queue_freeze (G_OBJECT (widget), _gtk_widget_child_property_notify_context);
 
+  /* Reset widget state */
+
+  reset_state_recurse (widget, NULL);
+
   /* unset focused and default children properly, this code
    * should eventually move into some gtk_window_unparent_branch() or
    * similar function.
