Commit 1b7a651a authored by Rob Adams's avatar Rob Adams Committed by Rob Adams

if we maximize after placement, and the window is too big to fix in the

2004-01-12  Rob Adams  <readams@readams.net>

	* src/constraints.c (meta_window_constrain): if we maximize after
	placement, and the window is too big to fix in the work area,
	define a sane saved_rect approximately with dimensions
	three-quarters approximately three quarters the size of the work
	area.  This avoids the problem where large windows would
	unmaximize and actually get bigger.  See #93590.
parent a605da04
2004-01-12 Rob Adams <readams@readams.net>
* src/constraints.c (meta_window_constrain): if we maximize after
placement, and the window is too big to fix in the work area,
define a sane saved_rect approximately with dimensions
three-quarters approximately three quarters the size of the work
area. This avoids the problem where large windows would
unmaximize and actually get bigger. See #93590.
2004-01-09 Thomas Fitzsimmons <fitzsim@redhat.com>
Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
......
......@@ -1319,6 +1319,19 @@ meta_window_constrain (MetaWindow *window,
(window->placed || did_placement))
{
window->maximize_after_placement = FALSE;
if (OUTER_WIDTH (*new) >= info.work_area_xinerama.width &&
OUTER_HEIGHT (*new) >= info.work_area_xinerama.height)
{
/* define a sane saved_rect so that the user can unmaximize
* to something reasonable.
*/
new->width = .75 * info.work_area_xinerama.width;
new->height = .75 * info.work_area_xinerama.height;
new->x = info.work_area_xinerama.x + .125 * info.work_area_xinerama.width;
new->y = info.work_area_xinerama.y + .083 * info.work_area_xinerama.height;
}
meta_window_maximize_internal (window, new);
/* maximization may have changed frame geometry */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment