mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
tiling: Limit tiling to landscape orientation
Tiling is arguably only useful for monitors in landscape orientation, so disable it when the current monitor is in portrait orientation.
This commit is contained in:
parent
7d58524185
commit
a2e4789b3e
@ -3202,6 +3202,10 @@ meta_window_can_tile (MetaWindow *window)
|
|||||||
monitor = meta_screen_get_current_monitor (window->screen);
|
monitor = meta_screen_get_current_monitor (window->screen);
|
||||||
meta_window_get_work_area_for_monitor (window, monitor->number, &tile_area);
|
meta_window_get_work_area_for_monitor (window, monitor->number, &tile_area);
|
||||||
|
|
||||||
|
/* Do not allow tiling in portrait orientation */
|
||||||
|
if (tile_area.height > tile_area.width)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
tile_area.width /= 2;
|
tile_area.width /= 2;
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
|
Loading…
Reference in New Issue
Block a user