diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index a27b474..a370bf0 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -165,6 +165,7 @@ struct _GtkWindowPrivate
   guint    position                  : 3;
   guint    reset_type_hint           : 1;
   guint    resizable                 : 1;
+  guint    resizable_set             : 1;
   guint    skips_pager               : 1;
   guint    skips_taskbar             : 1;
   guint    stick_initially           : 1;
@@ -180,7 +181,6 @@ struct _GtkWindowPrivate
   guint    resize_grip_visible       : 1;  /* don't use, just for "resize-
                                             * grip-visible" notification
                                             */
-
 };
 
 enum {
@@ -202,6 +202,7 @@ enum {
   PROP_TITLE,
   PROP_ROLE,
   PROP_RESIZABLE,
+  PROP_RESIZABLE_SET,
   PROP_MODAL,
   PROP_WIN_POS,
   PROP_DEFAULT_WIDTH,
@@ -416,6 +417,7 @@ static void     gtk_window_unrealize_icon             (GtkWindow    *window);
 static void     resize_grip_create_window             (GtkWindow    *window);
 static void     resize_grip_destroy_window            (GtkWindow    *window);
 static void     update_grip_visibility                (GtkWindow    *window);
+static void     set_grip_cursor                       (GtkWindow    *window);
 
 static void        gtk_window_notify_keys_changed (GtkWindow   *window);
 static GtkKeyHash *gtk_window_get_key_hash        (GtkWindow   *window);
@@ -654,6 +656,14 @@ gtk_window_class_init (GtkWindowClass *klass)
 							 GTK_PARAM_READWRITE));
   
   g_object_class_install_property (gobject_class,
+                                   PROP_RESIZABLE_SET,
+                                   g_param_spec_boolean ("resizable-set",
+							 P_("Resizable Set"),
+							 P_("Whether resizable has been explicitly set"),
+							 FALSE,
+							 GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (gobject_class,
                                    PROP_MODAL,
                                    g_param_spec_boolean ("modal",
 							 P_("Modal"),
@@ -1083,6 +1093,7 @@ gtk_window_init (GtkWindow *window)
   priv->default_widget = NULL;
   priv->configure_request_count = 0;
   priv->resizable = TRUE;
+  priv->resizable_set = FALSE;
   priv->configure_notify_received = FALSE;
   priv->position = GTK_WIN_POS_NONE;
   priv->need_default_size = TRUE;
@@ -1145,6 +1156,10 @@ gtk_window_set_property (GObject      *object,
     case PROP_RESIZABLE:
       gtk_window_set_resizable (window, g_value_get_boolean (value));
       break;
+    case PROP_RESIZABLE_SET:
+      priv->resizable_set = g_value_get_boolean (value);
+      gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
+      break;
     case PROP_MODAL:
       gtk_window_set_modal (window, g_value_get_boolean (value));
       break;
@@ -1249,6 +1264,9 @@ gtk_window_get_property (GObject      *object,
     case PROP_RESIZABLE:
       g_value_set_boolean (value, priv->resizable);
       break;
+    case PROP_RESIZABLE_SET:
+      g_value_set_boolean (value, priv->resizable_set);
+      break;
     case PROP_MODAL:
       g_value_set_boolean (value, priv->modal);
       break;
@@ -3036,6 +3054,7 @@ gtk_window_set_geometry_hints (GtkWindow       *window,
       gtk_window_set_gravity (window, geometry->win_gravity);
     }
 
+  //update_grip_visibility (window);
   gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
 }
 
@@ -5502,7 +5521,7 @@ gtk_window_resize_grip_is_visible (GtkWindow *window)
   if (priv->type == GTK_WINDOW_POPUP)
     return FALSE;
 
-  if (!priv->resizable)
+  if (priv->resizable_set && !priv->resizable)
     return FALSE;
 
   if (gtk_widget_get_realized (widget))
@@ -5740,6 +5759,8 @@ gtk_window_button_press_event (GtkWidget *widget,
 
   if (event->window == priv->grip_window)
     {
+      GdkWindowEdge edge;
+
       if (get_drag_edge (widget, &edge))
         gtk_window_begin_resize_drag (GTK_WINDOW (widget),
                                       edge,
@@ -7158,10 +7179,11 @@ gtk_window_compute_hints (GtkWindow   *window,
   gint extra_height = 0;
   GtkWindowGeometryInfo *geometry_info;
   GtkRequisition requisition;
+  GtkRequisition natural_size;
 
   widget = GTK_WIDGET (window);
 
-  gtk_widget_get_preferred_size (widget, &requisition, NULL);
+  gtk_widget_get_preferred_size (widget, &requisition, &natural_size);
   geometry_info = gtk_window_get_geometry_info (GTK_WINDOW (widget), FALSE);
 
   if (geometry_info)
@@ -7199,13 +7221,14 @@ gtk_window_compute_hints (GtkWindow   *window,
        */
 #define TEMPORARY_SIZE 10000 /* 10,000 pixels should be bigger than real widget sizes */
       GtkRequisition requisition;
+      GtkRequisition natural_size;
       int current_width, current_height;
 
       _gtk_widget_override_size_request (geometry_info->widget,
 					 TEMPORARY_SIZE, TEMPORARY_SIZE,
 					 &current_width, &current_height);
       gtk_widget_get_preferred_size (widget,
-                                     &requisition, NULL);
+                                     &requisition, &natural_size);
       _gtk_widget_restore_size_request (geometry_info->widget,
 					current_width, current_height);
 
@@ -7288,12 +7311,32 @@ gtk_window_compute_hints (GtkWindow   *window,
       else
 	new_geometry->max_height += extra_height;
     }
-  else if (!priv->resizable)
+  else if (priv->resizable_set)
     {
-      *new_flags |= GDK_HINT_MAX_SIZE;
+      if (!priv->resizable)
+        {
+          *new_flags |= GDK_HINT_MAX_SIZE;
       
-      new_geometry->max_width = requisition.width;
-      new_geometry->max_height = requisition.height;
+          new_geometry->max_width = requisition.width;
+          new_geometry->max_height = requisition.height;
+        }
+    }
+  else
+    {
+      new_geometry->max_width = G_MAXINT;
+      new_geometry->max_height = G_MAXINT;
+
+      if (!gtk_widget_compute_expand (widget, GTK_ORIENTATION_HORIZONTAL))
+        {
+          *new_flags |= GDK_HINT_MAX_SIZE;
+          new_geometry->max_width = natural_size.width;
+        }
+
+      if (!gtk_widget_compute_expand (widget, GTK_ORIENTATION_VERTICAL))
+        {
+          *new_flags |= GDK_HINT_MAX_SIZE;
+          new_geometry->max_height = natural_size.height;
+        }
     }
 
   *new_flags |= GDK_HINT_WIN_GRAVITY;
@@ -7990,6 +8033,12 @@ gtk_window_set_resizable (GtkWindow *window,
       gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
 
       g_object_notify (G_OBJECT (window), "resizable");
+
+      if (!priv->resizable_set)
+        {
+          priv->resizable_set = TRUE;
+          g_object_notify (G_OBJECT (window), "resizable-set");
+        }
     }
 }
 
