summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-10-22 01:46:48 +0000
committerElijah Newren <newren@src.gnome.org>2005-10-22 01:46:48 +0000
commit65437e8f7510df7636db0bc6c293d3f896cb17fc (patch)
tree6d97728b7b3e138a1e3101bee11a3d698cc17e27
parentab51f293f389240835fa5e4412c83d0a0ed36aa8 (diff)
downloadmetacity-65437e8f7510df7636db0bc6c293d3f896cb17fc.tar.gz
Nailed the "gnome-terminal drifts upward and leftward" problem
2005-10-21 Elijah Newren <newren@gmail.com> * constraints-ideas.txt: Nailed the "gnome-terminal drifts upward and leftward" problem * src/boxes.c (meta_rectangle_resize_with_gravity): rect->x and rect->y should be ignored because we're resizing old_rect according to the given gravity, not rect. So, in the cases where nothing fancy needs to be done, we need to at least copy over old_rect->x and old_rect->y. Stupid bug caused by usage being different than original version and most testcases not catching the difference... * src/testboxes.c (test_gravity_resize): modify one of the tests so that it would have caught the above bug
-rw-r--r--ChangeLog3
-rw-r--r--src/testboxes.c13
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 130b322c..0f523f74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@
different than original version and most testcases not catching
the difference...
+ * src/testboxes.c (test_gravity_resize): modify one of the tests
+ so that it would have caught the above bug
+
2005-10-21 Elijah Newren <newren@gmail.com>
* constraints-ideas.txt: Five quick ideas/problems/cleanups I
diff --git a/src/testboxes.c b/src/testboxes.c
index dd961590..fd9d8a9c 100644
--- a/src/testboxes.c
+++ b/src/testboxes.c
@@ -838,11 +838,14 @@ test_shoving_into_region ()
static void
test_gravity_resize ()
{
- MetaRectangle rect, temp;
-
- rect = meta_rect ( 50, 300, 250, 400);
- temp = meta_rect ( 50, 300, 20, 5);
- meta_rectangle_resize_with_gravity (&rect,
+ MetaRectangle oldrect, rect, temp;
+
+ rect.x = -500; /* Some random amount not equal to oldrect.x to ensure that
+ * the resize is done with respect to oldrect instead of rect
+ */
+ oldrect = meta_rect ( 50, 300, 250, 400);
+ temp = meta_rect ( 50, 300, 20, 5);
+ meta_rectangle_resize_with_gravity (&oldrect,
&rect,
NorthWestGravity,
20,