summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2017-08-30 15:13:58 -0400
committerVictor Kareh <[email protected]>2017-08-30 15:13:58 -0400
commitf396a2bebc9c365527c5c6e4d4d489879e8bbea4 (patch)
tree01a48bc49de888a02e3a08a4d83455176b95e9ab /src/core/window.c
parentc577f51e1e1258f8a6c55764a8b86d3421c466e7 (diff)
downloadmarco-f396a2bebc9c365527c5c6e4d4d489879e8bbea4.tar.bz2
marco-f396a2bebc9c365527c5c6e4d4d489879e8bbea4.tar.xz
Store a window flag when user resizes from tiled
Use that flag to retain the correct window size when performing other operations. Reset when re-tiling.
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 1bb3bb76..546600dd 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -476,6 +476,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->require_titlebar_visible = TRUE;
window->on_all_workspaces = FALSE;
window->tile_mode = META_TILE_NONE;
+ window->tile_resized = FALSE;
window->tile_monitor_number = -1;
window->shaded = FALSE;
window->initially_iconic = FALSE;
@@ -7032,6 +7033,7 @@ update_move (MetaWindow *window,
/* Check if the cursor is in a position which triggers tiling
* and set tile_mode accordingly.
*/
+ MetaTileMode tile_mode = window->tile_mode;
if (meta_window_can_tile (window) &&
x >= monitor->rect.x && x < (work_area.x + shake_threshold))
window->tile_mode = META_TILE_LEFT;
@@ -7047,6 +7049,10 @@ update_move (MetaWindow *window,
if (window->tile_mode != META_TILE_NONE)
window->tile_monitor_number = monitor->number;
+
+ /* Reset resized flag when changing tile mode */
+ if (tile_mode != window->tile_mode)
+ window->tile_resized = FALSE;
}
/* shake loose (unmaximize) maximized or tiled window if dragged beyond