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`.
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.
We only replace windows with clones when their position isn't possible, ie. when
they're less than 75 pixels inside the space, they're maximized or fullescreen.
The clickoverlays is now mostly decoupled from the visible status of the window
actor. They now always target the first window with an edge outside the
monitor. The width however is limited to 75 pixels (unless the window isn't
visible) making eg. drag and drop and drop possible while edge clicking will
never send input to the window.
The clickoverlays will now also span the window gap which makes it possible to
click on windows that's just off the monitor.
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.
With the two previous commits we can now safely remove the `restacked` signal
watching. For some reason watching the signal is this way blocks clicks while things are
moving.
So now it's possible to eg. doubleclick on the left/right edge and jump
two places.
onCompleted of the tween of the active window didn't always finish before all
other windows was done animating (seemingly at least). This caused a wrong
overlay position/width since it used `is_scaled` to find the top of the stack.
In general it's probably useful to be able to know which windows are stacked
before animations are done. Windows might be scaled for other reasons too.
Also fixes a bug where the left overlay was active even though the neighbor
fully obscured the left stack. (that caused a small region of the left most
unstacked window to unresponsive). (due to setting negative width being a noop)
We have to do this since mutter/gnome-shell does not account for stacking order
when handling mouse input. Ie. the overlay region ask to receive mouse input
from mutter. It does this even when it's below a window actor. (Only affects
X11, not wayland)
Turned out to be a bit more difficult than expected to make icons
visually pleasing. Mainly during animations. Icons are thus disabled.
Problems:
- The overlay prevents the cursor from changing shape to "resize" when
hovering the left/right side of the left/right-most non-stacked
window. It still works to resize though.
- Icon support semi-broken and ugly during transitions.
Ref: #10