tiling: Reset maximized tile mode when unmaximizing

Maximized tiled windows end up with an inconsistent tile mode when
unmaximized by other means than dragging the window free (e.g.
using the unmaximize button or double clicking the title bar), so
reset the tile mode when unmaximizing.

This is not a problem for side-by-side tiling, as there are no
alternatives to dragging the window free.
This commit is contained in:
Florian Müllner 2010-12-10 16:45:27 +01:00
parent 3f9c375f1c
commit 594a69317a

View File

@ -3335,6 +3335,13 @@ meta_window_unmaximize_internal (MetaWindow *window,
window->maximized_vertically =
window->maximized_vertically && !unmaximize_vertically;
/* Reset the tile mode for maximized tiled windows for consistency
* with "normal" maximized windows, but keep other tile modes,
* as side-by-side tiled windows may snap back.
*/
if (window->tile_mode == META_TILE_MAXIMIZED)
window->tile_mode = META_TILE_NONE;
/* Unmaximize to the saved_rect position in the direction(s)
* being unmaximized.
*/