diff options
author | Elijah Newren <newren@gmail.com> | 2005-11-16 00:30:04 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2005-11-16 00:30:04 +0000 |
commit | f41de74bbe3549e1dec174e6670c37420f80096f (patch) | |
tree | 126f7629dc696747900675a40df8d7d87ea7bcf4 | |
parent | fd279e3d61836e38f5ce65f20e455760e16594bc (diff) | |
download | metacity-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-- | ChangeLog | 5 | ||||
-rw-r--r-- | constraints-ideas.txt | 2 | ||||
-rw-r--r-- | src/constraints.c | 22 |
3 files changed, 12 insertions, 17 deletions
@@ -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 */ |