fixed_directions is only meant for explicit user interactions; disable it

2006-01-20  Elijah Newren  <newren gmail com>

	* src/constraints.c (setup_constraint_info): fixed_directions is
	only meant for explicit user interactions; disable it for
	everything else.  There are other bugs and improvements that could
	be made with fixed_directions that I should be filing too, but at
	least put a FIXME there for now--I'm so lame.  Fixes #327822.
This commit is contained in:
Elijah Newren 2006-01-21 01:09:46 +00:00 committed by Elijah Newren
parent 0ea8552531
commit 8e5425a86f
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2006-01-20 Elijah Newren <newren gmail com>
* src/constraints.c (setup_constraint_info): fixed_directions is
only meant for explicit user interactions; disable it for
everything else. There are other bugs and improvements that could
be made with fixed_directions that I should be filing too, but at
least put a FIXME there for now--I'm so lame. Fixes #327822.
2006-01-20 Elijah Newren <newren gmail com> 2006-01-20 Elijah Newren <newren gmail com>
Avoid flashing when closing a maximized window. Fixes #317254. Avoid flashing when closing a maximized window. Fixes #317254.

View File

@ -351,6 +351,12 @@ setup_constraint_info (ConstraintInfo *info,
info->resize_gravity = resize_gravity; info->resize_gravity = resize_gravity;
/* FIXME: fixed_directions might be more sane if we (a) made it
* depend on the grab_op type instead of current amount of movement
* (thus implying that it only has effect when user_action is true,
* and (b) ignored it for aspect ratio windows -- at least in those
* cases where both directions do actually change size.
*/
info->fixed_directions = 0; info->fixed_directions = 0;
/* If x directions don't change but either y direction does */ /* If x directions don't change but either y direction does */
if ( orig->x == new->x && orig->x + orig->width == new->x + new->width && if ( orig->x == new->x && orig->x + orig->width == new->x + new->width &&
@ -364,6 +370,14 @@ setup_constraint_info (ConstraintInfo *info,
{ {
info->fixed_directions = FIXED_DIRECTION_Y; info->fixed_directions = FIXED_DIRECTION_Y;
} }
/* The point of fixed directions is just that "move to nearest valid
* position" is sometimes a poorer choice than "move to nearest
* valid position but only change this coordinate" for windows the
* user is explicitly moving. This isn't ever true for things that
* aren't explicit user interaction, though, so just clear it out.
*/
if (!info->is_user_action)
info->fixed_directions = 0;
meta_window_get_work_area_current_xinerama (window, &info->work_area_xinerama); meta_window_get_work_area_current_xinerama (window, &info->work_area_xinerama);