diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 7bd04f0..1a2366e 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -153,6 +153,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;
@@ -182,6 +183,7 @@ enum {
   PROP_TITLE,
   PROP_ROLE,
   PROP_RESIZABLE,
+  PROP_RESIZABLE_SET,
   PROP_MODAL,
   PROP_WIN_POS,
   PROP_DEFAULT_WIDTH,
@@ -623,6 +625,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"),
@@ -1000,6 +1010,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;
@@ -1065,6 +1076,9 @@ 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);
+      break;
     case PROP_MODAL:
       gtk_window_set_modal (window, g_value_get_boolean (value));
       break;
@@ -1166,6 +1180,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;
@@ -6821,12 +6838,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 = requisition.width;
+        }
+
+      if (!gtk_widget_compute_expand (widget, GTK_ORIENTATION_VERTICAL))
+        {
+          *new_flags |= GDK_HINT_MAX_SIZE;
+          new_geometry->max_height = requisition.height;
+        }
     }
 
   *new_flags |= GDK_HINT_WIN_GRAVITY;
@@ -7499,9 +7536,14 @@ gtk_window_set_resizable (GtkWindow *window,
   if (priv->resizable != resizable)
     {
       priv->resizable = (resizable != FALSE);
-
       g_object_notify (G_OBJECT (window), "resizable");
 
+      if (!priv->resizable_set)
+        {
+          priv->resizable_set = TRUE;
+          g_object_notify (G_OBJECT (window), "resizable-set");
+        }
+
       gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
     }
 }
