workspacesView: Only animate primary view
Non-primary views always use their monitor's work area for their geometry, so there's nothing to animate when leaving the overview. The animation is already limited to the primary view when entering the overview, so this is also more consistent. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
This commit is contained in:
parent
14cfd74f08
commit
52a7481ba6
@ -569,14 +569,6 @@ class WorkspacesDisplay extends St.Widget {
|
||||
|
||||
animateFromOverview(fadeOnPrimary) {
|
||||
for (let i = 0; i < this._workspacesViews.length; i++) {
|
||||
const { x, y, width, height } =
|
||||
Main.layoutManager.getWorkAreaForMonitor(i);
|
||||
this._workspacesViews[i].ease({
|
||||
x, y, width, height,
|
||||
duration: ANIMATION_TIME,
|
||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
});
|
||||
|
||||
let animationType;
|
||||
if (fadeOnPrimary && i == this._primaryIndex)
|
||||
animationType = AnimationType.FADE;
|
||||
@ -584,6 +576,15 @@ class WorkspacesDisplay extends St.Widget {
|
||||
animationType = AnimationType.ZOOM;
|
||||
this._workspacesViews[i].animateFromOverview(animationType);
|
||||
}
|
||||
|
||||
const { primaryIndex } = Main.layoutManager;
|
||||
const { x, y, width, height } =
|
||||
Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
|
||||
this._getPrimaryView().ease({
|
||||
x, y, width, height,
|
||||
duration: ANIMATION_TIME,
|
||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
});
|
||||
}
|
||||
|
||||
vfunc_hide() {
|
||||
|
Loading…
Reference in New Issue
Block a user