summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2021-04-30 09:49:36 -0400
committerVictor Kareh <[email protected]>2021-05-26 14:25:31 -0400
commitfa2afbfd60443051e377193b52df54c080df7202 (patch)
tree029042a024a6e2b1ada4602405841fd8a293e22a /src/core
parent60f49ae5a272b737a944065e4199c8b2c8eec8b1 (diff)
downloadmarco-fa2afbfd60443051e377193b52df54c080df7202.tar.bz2
marco-fa2afbfd60443051e377193b52df54c080df7202.tar.xz
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.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/window.c6
1 files changed, 5 insertions, 1 deletions
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);