A typical case is mpv which preseerves its aspect ratio, resulting in a
completely different width than requested. This would cause `resize` to call
layout recursively running the first layout call last.
While we might need to steal some actions from gnome, we should support using
both actions if the user wants it.
Also add all the correct default bindings to the schema, and don't touch gesettings
at all. This should make it simpler to get #66 done.
Only look at the neighbours of the closed window when selecting a new window.
Also raise the window on ensure, this way the stacking order works like an mru
for selectedWindow.
When a window actor is hidden its clone won't properly update its size, so we
manually fix it up in resizeHandler.
To complicate matters this bugs out the new window animation so we need to delay
connecting the `size-changed` signal.
The cloneContainer now lives inside a `cloneClip` clipping the cloneContainer
correctly when previewing workspaces.
`ensureViewport` and `move_to` simply moves the scrollContainer instead of
laying out all the clones. The actual windows are only synced up with the clones
position on `Space.moveDone`. Space.layout is run when the actualy clone layout
changes, eg. when a window changes size, or a window is added to the tiling.
`move_to` also computes the windows that should show their MetaWindowActor on
`moveDone` and sets up the clickoverlays at the edges correctly.
`space.cloneContainer`s animation target can be looked at `space.targetX`.
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.