summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren gmail com>2006-09-18 21:08:46 +0000
committerElijah Newren <newren@src.gnome.org>2006-09-18 21:08:46 +0000
commit2d73af153013a28cf7e15f763c895db9e4c19b84 (patch)
treeafe609b20c60acda648ce1daf78c491a36ffaa44
parent470dc30174323a79ef42018b687e91b6c07008b5 (diff)
downloadmutter-2d73af153013a28cf7e15f763c895db9e4c19b84.tar.gz
Ignore maximum size hints when maximizing. Should fix #327543 (see comment
2006-09-18 Elijah Newren <newren gmail com> * src/constraints.c (constrain_maximization): Ignore maximum size hints when maximizing. Should fix #327543 (see comment 4 and comment 5).
-rw-r--r--ChangeLog6
-rw-r--r--src/constraints.c15
2 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 78978d462..b8e68391a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-09-18 Elijah Newren <newren gmail com>
+ * src/constraints.c (constrain_maximization): Ignore maximum size
+ hints when maximizing. Should fix #327543 (see comment 4 and comment
+ 5).
+
+2006-09-18 Elijah Newren <newren gmail com>
+
* src/ui.c (filter_func): avoid a compilation warning by making
sure to return something. #348067
diff --git a/src/constraints.c b/src/constraints.c
index ea78f39c1..228d0ad96 100644
--- a/src/constraints.c
+++ b/src/constraints.c
@@ -694,7 +694,7 @@ constrain_maximization (MetaWindow *window,
gboolean check_only)
{
MetaRectangle min_size, max_size, work_area;
- gboolean hminbad, vminbad, hmaxbad, vmaxbad;
+ gboolean hminbad, vminbad;
gboolean horiz_equal, vert_equal;
gboolean constraint_already_satisfied;
@@ -711,9 +711,7 @@ constrain_maximization (MetaWindow *window,
hminbad = work_area.width < min_size.width && window->maximized_horizontally;
vminbad = work_area.height < min_size.height && window->maximized_vertically;
- hmaxbad = work_area.width > max_size.width && window->maximized_horizontally;
- vmaxbad = work_area.height > max_size.height && window->maximized_vertically;
- if (hminbad || vminbad || hmaxbad || vmaxbad)
+ if (hminbad || vminbad)
return TRUE;
/* Determine whether constraint is already satisfied; exit if it is */
@@ -841,8 +839,13 @@ constrain_size_limits (MetaWindow *window,
/* Determine whether constraint is already satisfied; exit if it is */
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
- too_big = !meta_rectangle_could_fit_rect (&info->current, &min_size);
- too_small = !meta_rectangle_could_fit_rect (&max_size, &info->current);
+ /* We ignore max-size limits for maximized windows; see #327543 */
+ if (window->maximized_horizontally)
+ max_size.width = MAX (max_size.width, info->current.width);
+ if (window->maximized_vertically)
+ max_size.height = MAX (max_size.height, info->current.height);
+ too_small = !meta_rectangle_could_fit_rect (&info->current, &min_size);
+ too_big = !meta_rectangle_could_fit_rect (&max_size, &info->current);
constraint_already_satisfied = !too_big && !too_small;
if (check_only || constraint_already_satisfied)
return constraint_already_satisfied;