summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorOmar Zeidan <[email protected]>2017-12-31 16:03:36 +0100
committerraveit65 <[email protected]>2018-01-02 09:24:38 +0100
commit709fe3eb2f8987ffc598ecbece4997acdf51cdca (patch)
tree8f3296e10c3ed60f91f3063c709b7ebcedc03696 /src/core/window.c
parent9e2b7eff713b6881a60538e08e222dad0d364647 (diff)
downloadmarco-709fe3eb2f8987ffc598ecbece4997acdf51cdca.tar.bz2
marco-709fe3eb2f8987ffc598ecbece4997acdf51cdca.tar.xz
Implemented a setting to disable top tiling
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/window.c b/src/core/window.c
index bdc9a712..530bc407 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7033,7 +7033,7 @@ update_move (MetaWindow *window,
window->tile_mode = META_TILE_NONE;
window->tile_monitor_number = -1;
}
- else if (meta_prefs_get_side_by_side_tiling () &&
+ else if (meta_prefs_get_allow_tiling () &&
!META_WINDOW_MAXIMIZED (window) &&
!META_WINDOW_TILED (window))
{
@@ -7061,16 +7061,16 @@ 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;
+ MetaTileMode old_tile_mode = window->tile_mode;
window->tile_mode = calculate_tiling_mode(x, y, window, monitor,
work_area, shake_threshold);
-
-
+
+
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)
+ if (old_tile_mode != window->tile_mode)
window->tile_resized = FALSE;
}
@@ -7265,7 +7265,8 @@ static MetaTileMode calculate_tiling_mode(int x,
return META_TILE_RIGHT;
}
else if (meta_window_can_tile_maximized (window) &&
- y >= monitor->rect.y && y <= work_area.y)
+ y >= monitor->rect.y && y <= work_area.y &&
+ meta_prefs_get_allow_top_tiling ())
return META_TILE_MAXIMIZED;
else
return META_TILE_NONE;