7 Commits

Author SHA1 Message Date
Alexander Mikhaylenko
b1afb946b2 workspaceAnimation: Support multiple monitors
Currently, there's one animation for the whole canvas. While it looks fine
with just one screen, it causes windows to move between screens when
switching workspaces. Instead, have a separate animation on each screen,
and sync their progress so that at any given time the progress "fraction"
is the same between all screens. Clip all animations to their screens so
that the windows don't leak to other screens.

If a window is placed between every screen, can end up in multiple
animations, in that case each part is still animated separately.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1213

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
2020-02-26 10:36:10 +01:00
Alexander Mikhaylenko
46d5bccfc6 workspaceAnimation: Use window clones
Instead of reparenting windows, clone them. This will allow to properly
support multi-monitor setups in subsequent commits.

Block window mapping animation while the animation is running to prevent
new windows appearing during the animation from being visible at the same
time as their clones.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/929

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
2020-02-26 10:36:10 +01:00
Alexander Mikhaylenko
f0d498062d workspaceAnimation: Only create moving window bin when needed
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
2020-02-26 10:36:10 +01:00
Alexander Mikhaylenko
eeac4a3b6d workspaceAnimation: Extract WorkspaceGroup
Reimplement _syncStacking().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
2020-02-26 10:36:10 +01:00
Alexander Mikhaylenko
272cb4d523 workspaceAnimation: Extract WorkspaceAnimation
Simplify the logic a bit. Introduce WorkspaceAnimation class that reparents
the windows from current, surrounding and destination workspaces and manages
them. Expose 'progress' property and have WorkspaceAnimationController animate
it instead of animating everything separately.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
2020-02-26 10:36:10 +01:00
Alexander Mikhaylenko
6d5446e4a6 workspaceAnimation: Stop depending on shellwm
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
2020-02-26 10:36:10 +01:00
Alexander Mikhaylenko
fa31bcaa7a workspaceAnimation: Split from WindowManager
It's already too complex, and will get more complex in future, split it
out.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
2020-02-26 10:36:10 +01:00