summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-11-16 00:30:04 +0000
committerElijah Newren <newren@src.gnome.org>2005-11-16 00:30:04 +0000
commitf41de74bbe3549e1dec174e6670c37420f80096f (patch)
tree126f7629dc696747900675a40df8d7d87ea7bcf4
parentfd279e3d61836e38f5ce65f20e455760e16594bc (diff)
downloadmetacity-f41de74bbe3549e1dec174e6670c37420f80096f.tar.gz
finally fix the long outstanding FIXME about when to clamp
2005-11-15 Elijah Newren <newren@gmail.com> * src/constraints.c (do_screen_and_xinerama_relative_constraints): finally fix the long outstanding FIXME about when to clamp
-rw-r--r--ChangeLog5
-rw-r--r--constraints-ideas.txt2
-rw-r--r--src/constraints.c22
3 files changed, 12 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 2bfc8949..4d916ea3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-11-15 Elijah Newren <newren@gmail.com>
+ * src/constraints.c (do_screen_and_xinerama_relative_constraints):
+ finally fix the long outstanding FIXME about when to clamp
+
+2005-11-15 Elijah Newren <newren@gmail.com>
+
Update, fix, and extend all the documentation on constraints.
* src/constraints-ideas.txt: Update
diff --git a/constraints-ideas.txt b/constraints-ideas.txt
index 8606af32..21ffa268 100644
--- a/constraints-ideas.txt
+++ b/constraints-ideas.txt
@@ -127,7 +127,7 @@ Short-term (I hope...) TODO list/reminders:
before shoving window entirely onscreen (and amount of titlebar
obscured before it's considered offscreen?)
- - Need to clean out lots of FIXMEs in the code.
+ X Need to clean out lots of FIXMEs in the code.
X Need to do the titlebar offscreen checking, partial maximization, etc.
diff --git a/src/constraints.c b/src/constraints.c
index 174078a6..f461d929 100644
--- a/src/constraints.c
+++ b/src/constraints.c
@@ -940,22 +940,12 @@ do_screen_and_xinerama_relative_constraints (
/* Enforce constraint */
- /* Clamp rectangle size for user move+resize, app move+resize, and
- * app resize; FIXME FIXME FIXME: Is this really right?!? Why not
- * clamp for user resize if clamping for user move+resize?!? Just
- * because it'll be clipped below anyway? Also, why doesn't the
- * comment match the code?!??
- *
- * QUIT WRITING SUCH STINKING BUGGY CODE AND COMMENTS!!!!!
- */
- if (info->action_type == ACTION_MOVE_AND_RESIZE ||
- (info->is_user_action && info->action_type == ACTION_RESIZE))
- {
- meta_rectangle_clamp_to_fit_into_region (region_spanning_rectangles,
- info->fixed_directions,
- &info->current,
- &min_size);
- }
+ /* Clamp rectangle size for resize or move+resize actions */
+ if (info->action_type != ACTION_MOVE)
+ meta_rectangle_clamp_to_fit_into_region (region_spanning_rectangles,
+ info->fixed_directions,
+ &info->current,
+ &min_size);
if (info->is_user_action && info->action_type == ACTION_RESIZE)
/* For user resize, clip to the relevant region */