From 594a69317ac54172e90940fad5ace633dd056714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 10 Dec 2010 16:45:27 +0100 Subject: [PATCH] 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. --- src/core/window.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index c1c119c51..3e5c754c0 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -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. */