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 to test tiling
behavior.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1171
This commit is contained in:
Jonas Ådahl 2020-04-02 19:05:21 +02:00 committed by Georges Basile Stavracas Neto
parent 668eb318c7
commit 033f0d11bf

View File

@ -3156,6 +3156,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;