From f41de74bbe3549e1dec174e6670c37420f80096f Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Wed, 16 Nov 2005 00:30:04 +0000 Subject: finally fix the long outstanding FIXME about when to clamp 2005-11-15 Elijah Newren * src/constraints.c (do_screen_and_xinerama_relative_constraints): finally fix the long outstanding FIXME about when to clamp --- ChangeLog | 5 +++++ constraints-ideas.txt | 2 +- src/constraints.c | 22 ++++++---------------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2bfc8949..4d916ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-15 Elijah Newren + + * src/constraints.c (do_screen_and_xinerama_relative_constraints): + finally fix the long outstanding FIXME about when to clamp + 2005-11-15 Elijah Newren Update, fix, and extend all the documentation on constraints. 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 */ -- cgit v1.2.1