Index: src/constraints.c
===================================================================
RCS file: /cvs/gnome/metacity/src/constraints.c,v
retrieving revision 1.29
diff -u -p -r1.29 constraints.c
--- src/constraints.c	21 Jan 2006 01:09:46 -0000	1.29
+++ src/constraints.c	22 Feb 2006 03:18:22 -0000
@@ -657,10 +657,15 @@ constrain_maximization (MetaWindow      
 
   hminbad = work_area.width < min_size.width && window->maximized_horizontally;
   vminbad = work_area.height < min_size.height && window->maximized_vertically;
+  if (hminbad || vminbad)
+    return TRUE;
+
   hmaxbad = work_area.width > max_size.width && window->maximized_horizontally;
   vmaxbad = work_area.height > max_size.height && window->maximized_vertically;
-  if (hminbad || vminbad || hmaxbad || vmaxbad)
-    return TRUE;
+  if (hmaxbad)
+    work_area.width = max_size.width;
+  if (vmaxbad)
+    work_area.height = max_size.height;
 
   /* Determine whether constraint is already satisfied; exit if it is */
   horiz_equal = work_area.x      == info->current.x &&
