workspace: Always use floating layout for fade transition

We don't animate size and position when fading, so we want all previews
to already be at their final position. However when the app picker is
opened from within the overview, window previews use the zoomed layout,
so that's the state we are then fading when leaving the overview from
the app picker.

Fix that by setting the correct state at the start of the fade transition.

(In the case of fadeToOverview(), the value should always be correct
already, but set it anyway for symmetry with fadeFromOverview())

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
This commit is contained in:
Florian Müllner 2020-07-11 17:38:04 +02:00 committed by Georges Basile Stavracas Neto
parent ed4baec40f
commit 6cdaec4001

View File

@ -1027,6 +1027,8 @@ class Workspace extends St.Widget {
if (this.metaWorkspace !== null && !this.metaWorkspace.active) if (this.metaWorkspace !== null && !this.metaWorkspace.active)
return; return;
this.layout_manager.stateAdjustment.value = 0;
// Special case maximized windows, since it doesn't make sense // Special case maximized windows, since it doesn't make sense
// to animate windows below in the stack // to animate windows below in the stack
let topMaximizedWindow; let topMaximizedWindow;
@ -1079,6 +1081,8 @@ class Workspace extends St.Widget {
if (this.metaWorkspace !== null && !this.metaWorkspace.active) if (this.metaWorkspace !== null && !this.metaWorkspace.active)
return; return;
this.layout_manager.stateAdjustment.value = 0;
// Special case maximized windows, since it doesn't make sense // Special case maximized windows, since it doesn't make sense
// to animate windows below in the stack // to animate windows below in the stack
let topMaximizedWindow; let topMaximizedWindow;