summaryrefslogtreecommitdiff
path: root/src/core/constraints.c
diff options
context:
space:
mode:
authorMikkel Kamstrup Erlandsen <kamstrup@src.gnome.org>2008-02-21 10:00:10 +0000
committerMikkel Kamstrup Erlandsen <kamstrup@src.gnome.org>2008-02-21 10:00:10 +0000
commit3ca31c7b04e00d0fecae9ebaa5aa66da7ff5ae1e (patch)
tree1974d3a8fa266f79dc803af1272fcaa13a083810 /src/core/constraints.c
parent8802ac2fe9590d646564f57199e73003c2d48138 (diff)
downloadmetacity-3ca31c7b04e00d0fecae9ebaa5aa66da7ff5ae1e.tar.gz
Respect requested position on _NET_MOVERESIZE_WINDOW. Closes #448183
svn path=/trunk/; revision=3585
Diffstat (limited to 'src/core/constraints.c')
-rw-r--r--src/core/constraints.c34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/core/constraints.c b/src/core/constraints.c
index 8cba3bfb..e081347c 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -852,8 +852,17 @@ constrain_size_increments (MetaWindow *window,
if (new_height < window->size_hints.min_height)
new_height += ((window->size_hints.min_height - new_height)/hi + 1)*hi;
+ /* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
+ * See bug 448183
+ */
+ MetaRectangle *start_rect;
+ if (info->action_type == ACTION_MOVE_AND_RESIZE)
+ start_rect = &info->current;
+ else
+ start_rect = &info->orig;
+
/* Resize to the new size */
- meta_rectangle_resize_with_gravity (&info->orig,
+ meta_rectangle_resize_with_gravity (start_rect,
&info->current,
info->resize_gravity,
new_width,
@@ -898,7 +907,17 @@ constrain_size_limits (MetaWindow *window,
/*** Enforce constraint ***/
new_width = CLAMP (info->current.width, min_size.width, max_size.width);
new_height = CLAMP (info->current.height, min_size.height, max_size.height);
- meta_rectangle_resize_with_gravity (&info->orig,
+
+ /* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
+ * See bug 448183
+ */
+ MetaRectangle *start_rect;
+ if (info->action_type == ACTION_MOVE_AND_RESIZE)
+ start_rect = &info->current;
+ else
+ start_rect = &info->orig;
+
+ meta_rectangle_resize_with_gravity (start_rect,
&info->current,
info->resize_gravity,
new_width,
@@ -1022,7 +1041,16 @@ constrain_aspect_ratio (MetaWindow *window,
break;
}
- meta_rectangle_resize_with_gravity (&info->orig,
+ /* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
+ * See bug 448183
+ */
+ MetaRectangle *start_rect;
+ if (info->action_type == ACTION_MOVE_AND_RESIZE)
+ start_rect = &info->current;
+ else
+ start_rect = &info->orig;
+
+ meta_rectangle_resize_with_gravity (start_rect,
&info->current,
info->resize_gravity,
new_width,