Index: src/boxes.c
===================================================================
RCS file: /cvs/gnome/metacity/src/boxes.c,v
retrieving revision 1.9
diff -u -d -p -r1.9 boxes.c
--- src/boxes.c	1 Oct 2006 22:30:00 -0000	1.9
+++ src/boxes.c	13 Oct 2006 14:19:56 -0000
@@ -813,29 +813,28 @@ meta_rectangle_clip_to_region (const GLi
   /* First, find best rectangle from spanning_rects to which we will clip
    * rect into.
    */
-  temp = spanning_rects;
-  while (temp)
+  for (temp = spanning_rects; temp; temp = temp->next)
     {
       int factor = 1;
       MetaRectangle *compare_rect = temp->data;
       MetaRectangle  overlap;
       int            maximal_overlap_amount_for_compare;
-      
-      /* If x is fixed and the entire width of rect doesn't fit in compare, set
-       * factor to 0.
+     
+      /* If x is fixed and the entire width of rect doesn't fit in compare,
+       * skip the rectangle.
        */
       if ((fixed_directions & FIXED_DIRECTION_X) &&
           (compare_rect->x > rect->x || 
            compare_rect->x + compare_rect->width < rect->x + rect->width))
-        factor = 0;
+        continue;
         
-      /* If y is fixed and the entire height of rect doesn't fit in compare, set
-       * factor to 0.
+      /* If y is fixed and the entire height of rect doesn't fit in compare,
+       * skip the rectangle.
        */
       if ((fixed_directions & FIXED_DIRECTION_Y) &&
           (compare_rect->y > rect->y || 
            compare_rect->y + compare_rect->height < rect->y + rect->height))
-        factor = 0;
+        continue;
 
       /* Determine maximal overlap amount */
       meta_rectangle_intersect (rect, compare_rect, &overlap);
@@ -848,8 +847,6 @@ meta_rectangle_clip_to_region (const GLi
           best_rect    = compare_rect;
           best_overlap = maximal_overlap_amount_for_compare;
         }
-
-      temp = temp->next;
     }
 
   /* Clip rect appropriately */
@@ -925,7 +922,7 @@ meta_rectangle_shove_into_region (const 
         MIN (rect->width,  compare_rect->width) *
         MIN (rect->height, compare_rect->height);
 
-      /* Determine distance necessary to put rect into comapre_rect */
+      /* Determine distance necessary to put rect into compare_rect */
       dist_to_compare = 0;
       if (compare_rect->x > rect->x)
         dist_to_compare += compare_rect->x - rect->x;
Index: src/constraints.c
===================================================================
RCS file: /cvs/gnome/metacity/src/constraints.c,v
retrieving revision 1.38
diff -u -d -p -r1.38 constraints.c
--- src/constraints.c	13 Oct 2006 00:28:18 -0000	1.38
+++ src/constraints.c	13 Oct 2006 14:19:56 -0000
@@ -994,13 +994,15 @@ do_screen_and_xinerama_relative_constrai
   gboolean exit_early = FALSE, constraint_satisfied;
   MetaRectangle how_far_it_can_be_smushed, min_size, max_size;
 
+#ifdef WITH_VERBOSE_MODE
   /* First, log some debugging information */
   char spanning_region[1 + 28 * g_list_length (region_spanning_rectangles)];
-  (void) spanning_region;  /* Avoid stupid & incorrect compiler warnings... */
+
   meta_topic (META_DEBUG_GEOMETRY,
               "screen/xinerama constraint; region_spanning_rectangles: %s\n",
               meta_rectangle_region_to_string (region_spanning_rectangles, ", ", 
                                                spanning_region));
+#endif
 
   /* Determine whether constraint applies; exit if it doesn't */
   how_far_it_can_be_smushed = info->current;
