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 add a `space.actor` to hold background, cloneContainer and label. The
cloneContainer can then clip itself, letting the background have some horizontal
padding.
The background is also positioned somewhat above the monitor to avoid showing
anything through the upper corners.
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.
We move and scale the `space.clip`s to the active monitor. If we select a
workspace which came from another monitor we move it fully to the active monitor
with `space.setMonitor`.
We only move windows with a visible WindowActor to avoid moving windows into
spaces that's positioned to the left or right.
Also replace all window actors with clones when monitors change to prevent
windows changing workspace when monitors are added or removed.
We create an actor spanning the whole screen, `Spaces.spaceContainer` which
holds all spaces. A `Space` is now first contained in a `Space.clip` container
which clips away anything that protrudes from the monitor.
The main advantage over having a per monitor clipping actor is getting
flexibility in moving a space around the screen without changing it's monitor.
We also hook up the `monitors-changed` signal, putting the active workpace on
the primary display, and populating the other monitors with the rest of the
workspace mru.
This also prevents a bug where we could end up moving a BackgroundActor.
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
This means that we won't kill keybindings on disable (which could be worked
around) or crashes (which would be much harder to work around).
NB: it's necessary to go into dconf and restore
`switch-applications[-backward]`, `switch-group[-backward]` to get the
keybindings working again.