tiling: Do not restore maximized tile state when unmaximizing

When a tiled window is maximized (e.g. by clicking the title bar
button), unmaximizing the window restores the tiled state. While
this is reasonable for side-by-side tiling, it is confusing for
"maximize" tiled windows, as unmaximization has no visible effect.

Change unmaximize to only restore the tiled state of side-by-side
tiled windows.
This commit is contained in:
Florian Müllner 2010-12-04 20:49:24 +01:00
parent b85171007e
commit 654bd15319

View File

@ -3418,7 +3418,8 @@ meta_window_unmaximize (MetaWindow *window,
MetaMaximizeFlags directions) MetaMaximizeFlags directions)
{ {
/* Restore tiling if necessary */ /* Restore tiling if necessary */
if (window->tile_mode != META_TILE_NONE) if (window->tile_mode == META_TILE_LEFT ||
window->tile_mode == META_TILE_RIGHT)
{ {
window->maximized_horizontally = FALSE; window->maximized_horizontally = FALSE;
meta_window_tile (window); meta_window_tile (window);