mirror of
https://github.com/brl/mutter.git
synced 2025-08-10 18:34:42 +00:00
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:

committed by
Havoc Pennington

parent
23cefa0bb5
commit
b908e45208
18
src/window.c
18
src/window.c
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user