There's a few differences in how onComplete is run:
- We need to run moveDone on every clone transition, as the transitions aren't
done when cloneContainer's transition finishes
- We cannot run layout until startup is done. For some reason onComplete runs
before monitor setup is done properly.
squash! Use clutter animations
- Can't use addTween as a timeout, but transitions are now finished when
onComplete is run, so there's no need for this anymore.
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.
There's a bug in SwitcherPopup where pushModal will sometimes fail on
`parent.show`. We therefor move most of the initialization to
`_initialSelection` which is run after the `pushModal` calls.
This also caused the issue where animations would randomly be blocked after a
navigation, which should be fixed now.
We're assessing all top level declarations from outside the original scope when
we're evaluating code. So everything should be `var`.
Classes are `let` bound so we should use var for `ClickOverlay` too, but there's
a bug in gnome-shell-mode making such statements not evaluate. We therefor wait
for that to be fixed.
Adds a `Space.monitor` property, hard coded to the primary monitor for the
moment. `move` needs to know about which space it's moving windows on.
It seems that we really don't have to worry about scaling, as it mutter should
take care of it automatically.
fixes#47
Functions which are called from signals is left alone for now since
`dynamic_function_ref` depends on looking up things in `window`. `debug` is
also still a global.