1
0
Fork 0

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:
Florian Müllner 2010-09-24 13:23:18 +02:00
parent 7d58524185
commit a2e4789b3e

View file

@ -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)