summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-05-26 18:42:55 +0000
committerElijah Newren <newren@src.gnome.org>2005-05-26 18:42:55 +0000
commite1891161d0d92d4fe31624625057d2860f7543b0 (patch)
tree440a6f44b9ac0b78d4bf40b5a38d04e8c2f56896
parenteb46b01e97e0111c096fb60953de26fcb8779e87 (diff)
downloadmetacity-e1891161d0d92d4fe31624625057d2860f7543b0.tar.gz
don't accidentally treat maximize vertically as maximize in both
2005-05-26 Elijah Newren <newren@gmail.com> * src/window.c (check_maximize_to_work_area): don't accidentally treat maximize vertically as maximize in both directions. Fixes #302204.
-rw-r--r--ChangeLog11
-rw-r--r--src/window.c13
2 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 601a4262..4718eb78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,15 @@
2005-05-26 Elijah Newren <newren@gmail.com>
- * src/window.c: (meta_window_new_with_attrs): put all transients
+ * src/window.c (check_maximize_to_work_area): don't accidentally
+ treat maximize vertically as maximize in both directions. Fixes
+ #302204.
+
+2005-05-26 Elijah Newren <newren@gmail.com>
+
+ * src/window.c (meta_window_new_with_attrs): put all transients
of the new window, if any exist, in the calc_showing queue. Fixes
- #303284.
+ #303284. Thanks to Billy Biggs for the testcase that made this
+ easy to track down.
2005-04-11 Elijah Newren <newren@gmail.com>
diff --git a/src/window.c b/src/window.c
index d605b4fc..31930431 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2998,8 +2998,17 @@ check_maximize_to_work_area (MetaWindow *window,
meta_window_get_outer_rect (window, &rect);
- if ( rect.x >= work_area->x &&
- rect.y >= work_area->y &&
+ /* The logic in this if is basically:
+ * if window's left side is at far left or offscreen AND
+ * window's bottom side is far top or offscreen AND
+ * window's right side is at far right or offscreen AND
+ * window's bottom side is at far bottom or offscreen
+ * except that we maximize windows with a size increment hint (e.g.
+ * terminals) should be maximized if they are "sufficiently close"
+ * to the above criteria...
+ */
+ if ( rect.x <= work_area->x &&
+ rect.y <= work_area->y &&
(((work_area->width + work_area->x) - (rect.width + rect.x)) <
window->size_hints.width_inc) &&
(((work_area->height + work_area->y) - (rect.height + rect.y)) <