try to maximize windows that are too big for the work area

2002-07-12  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new): try to maximize windows that
	are too big for the work area

	* src/place.c (find_next_cascade): don't let the cascade algorithm
	place windows off the screen, and fix it to always exhaustively
	search the window list for cascade parents.
This commit is contained in:
Havoc Pennington
2002-07-12 23:03:40 +00:00
committed by Havoc Pennington
parent 23cefa0bb5
commit b908e45208
3 changed files with 47 additions and 3 deletions

View File

@@ -609,6 +609,24 @@ meta_window_new (MetaDisplay *display, Window xwindow,
}
}
/* Maximize windows if they are too big for their work
* area (bit of a hack here). Assume undecorated windows
* probably don't intend to be maximized.
*/
if (window->has_maximize_func && window->decorated)
{
MetaRectangle workarea;
MetaRectangle outer;
meta_window_get_work_area (window, TRUE, &workarea);
meta_window_get_outer_rect (window, &outer);
if (outer.width >= workarea.width &&
outer.height >= workarea.height)
meta_window_maximize (window);
}
/* Sync stack changes */
meta_stack_thaw (window->screen->stack);