--- a/patches/metacity-08-constrain-window.diff Wed Jan 04 16:13:22 2006 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
---- metacity/src/constraints.c Tue Jan 18 01:55:09 2005
-+++ metacity-new/src/constraints.c Wed May 11 09:04:30 2005
-@@ -402,9 +402,13 @@ get_outermost_onscreen_positions (MetaWi
-
- tmp = tmp->next;
- }
--
-- *leftmost_x_p = *leftmost_x_p - current.width +
-- MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
-+
-+ if (window->placed ||
-+ (!window->placed && !window->calc_placement))
-+ {
-+ *leftmost_x_p = *leftmost_x_p - current.width +
-+ MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
-+ }
- }
-
- tmp = workspaces;
-@@ -434,8 +438,12 @@ get_outermost_onscreen_positions (MetaWi
- tmp = tmp->next;
- }
-
-- *rightmost_x_p = *rightmost_x_p -
-- MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
-+ if (window->placed ||
-+ (!window->placed && !window->calc_placement))
-+ {
-+ *rightmost_x_p = *rightmost_x_p -
-+ MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
-+ }
- }
-
- tmp = workspaces;
-@@ -632,7 +640,11 @@ constraint_onscreen_move_func (MetaWi
- &topmost_y, &bottommost_y);
-
- min_delta = topmost_y - orig->y;
-- max_delta = bottommost_y - orig->y;
-+
-+ if (!window->placed && window->calc_placement)
-+ max_delta = bottommost_y - orig->y - orig->height;
-+ else
-+ max_delta = bottommost_y - orig->y;
-
- /* Note that min delta (top left) has priority over
- * max delta (bottom right) to facilitate keeping
-@@ -644,7 +656,11 @@ constraint_onscreen_move_func (MetaWi
- *y_delta = min_delta;
-
- min_delta = leftmost_x - orig->x;
-- max_delta = rightmost_x - orig->x;
-+
-+ if (!window->placed && window->calc_placement)
-+ max_delta = rightmost_x - orig->x - orig->width;
-+ else
-+ max_delta = rightmost_x - orig->x;
-
- if (*x_delta > max_delta)
- *x_delta = max_delta;