Similar to Minimap.layout, it will move through the tiling from left to right
laying out clones correctly in the space.cloneContainer.
A clone's animation target can be looked up using `clone.targetX`.
Doesn't make sense to revaluate each time the window changes workspace.
Also make it easier to control initial focus of scratch windows and removes
side-effects from add_filter.
We use this pattern all over the place:
```
signals = [ foo.connect('bar', handler) ];
signals.forEach(id => foo.disconnect(id));
```
So we abstract it into a class that keeps track of the state automatically.
A space now emits four signals (supplying these arguments):
1. `select`, which runs on `ensureViewport`
2. `window-added` (metaWindow, index, row)
3. `window-removed` (metaWindow, index, row)
4. `monitor-changed`, currently not used
The minimap hooks into these signals updating as necessary. This is a lot
cleaner and goes a long way untangling the minimap from the navigator. One nice
effect is proper support of adding and removing windows when the minimap is
active.
It also works better on wayland as there's less reliance on synchronous updates.
Let focus follow the selected window. This caused issues in the past, but seems
to work now. It actually makes the switch more reliable, squashing a weird bug
where changing to another after moving a window would trigger the native switch
workspace animation.
In `moveSizeHandler` we need to check the coordinates of the window against the
monitor because `metaWindow.get_monitor()` reports the old monitor.
We also need to force ensure when inserting a window into a workspace that's not
active.
When monitors actually change we try out some heuristics. In particular we make
sure that the previously active workspace is shown on its assigned
monitor (which might've changed).
Simply rebuild all the clones whenever we execute a non-navigating action. This
is a bit ad-hoc and the whole minimap should probably be rewritten using signals
emitted when the associated space changes (eg. on `space.addWindow`).
Instead of removing the gap when we're dealing with fullscreen or maximized
windows we remove it when the overlay is wider than 75 pixels.
Also fully cover all windows that aren't marked as `visible` by the space.
`move_to` means move the window's *column*, not the window itself.
- Honor y argument in move_to. It's needed to position fullscreen/maximized
windows.
- Provide a default y value for move_to (top of column)
- Use the moved frame's x position in moveSizeHandler (otherwise it's not
possible to move non-top vertically tiled windows
Only passing y to move_to in moveSizeHandler is maybe a bit confusing?