window: Set fall-back tile monitor if not set

When tiling, we want to set the tile monitor. To not have to do this
from the call site, make meta_window_tile() fall back to the current
monitor if nothing set it prior to the call.

This will make it more convenient for test cases that what to test
tiling.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1171
This commit is contained in:
Jonas Ådahl 2020-04-02 19:05:21 +02:00
parent 95f3fe7bd5
commit c413dd9078

View File

@ -3180,6 +3180,10 @@ meta_window_tile (MetaWindow *window,
window->tile_monitor_number = -1;
return;
}
else
{
window->tile_monitor_number = window->monitor->number;
}
if (window->tile_mode == META_TILE_MAXIMIZED)
directions = META_MAXIMIZE_BOTH;