From fa2afbfd60443051e377193b52df54c080df7202 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Fri, 30 Apr 2021 09:49:36 -0400 Subject: window: Track window rectangle before tiling When tiling a maximized window, we should keep track of the saved rectangle so that tiling does not reset our window size. Otherwise, untiling the previously maximized window will end up with an unmaximized full-size window, rather than the original window size. --- src/core/window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/window.c b/src/core/window.c index 11b764bc..c7bad1af 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2699,7 +2699,11 @@ meta_window_tile (MetaWindow *window) return; if(window->tile_mode == META_TILE_LEFT || window->tile_mode == META_TILE_RIGHT) - meta_window_maximize_internal (window, META_MAXIMIZE_VERTICAL, NULL); + { + MetaRectangle *saved_rect = NULL; + saved_rect = &window->saved_rect; + meta_window_maximize_internal (window, META_MAXIMIZE_VERTICAL, saved_rect); + } else meta_window_save_rect(window); -- cgit v1.2.1