workspacesView: Really don't animate primary view when fading

In commit 9297d87775 we stopped syncing the primary view's actual
geometry at the start of the transition when doing a fade animation,
however the view animation may still be triggered by an allocation
change.

Prevent those unwanted size changes during fade by keeping track of
the fade state and explicitly skip syncing the geometry while a fade
is ongoing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
This commit is contained in:
Florian Müllner 2020-07-11 18:19:27 +02:00 committed by Georges Basile Stavracas Neto
parent 9e8883c922
commit ed4baec40f

View File

@ -383,8 +383,10 @@ class WorkspacesDisplay extends St.Widget {
this._windowDragEndId =
Main.overview.connect('window-drag-begin',
this._windowDragEnd.bind(this));
this._overviewShownId = Main.overview.connect('shown',
this._syncWorkspacesActualGeometry.bind(this));
this._overviewShownId = Main.overview.connect('shown', () => {
this._inWindowFade = false;
this._syncWorkspacesActualGeometry();
});
this._primaryIndex = Main.layoutManager.primaryIndex;
this._workspacesViews = [];
@ -403,6 +405,7 @@ class WorkspacesDisplay extends St.Widget {
this._actualGeometry = null;
this._inWindowDrag = false;
this._inWindowFade = false;
this._gestureActive = false; // touch(pad) gestures
this._canScroll = true; // limiting scrolling speed
@ -560,6 +563,8 @@ class WorkspacesDisplay extends St.Widget {
this._workspacesViews[i].animateToOverview(animationType);
}
this._inWindowFade = fadeOnPrimary;
if (this._actualGeometry && !fadeOnPrimary)
this._syncWorkspacesActualGeometry();
@ -583,6 +588,8 @@ class WorkspacesDisplay extends St.Widget {
this._workspacesViews[i].animateFromOverview(animationType);
}
this._inWindowFade = fadeOnPrimary;
const { primaryIndex } = Main.layoutManager;
const { x, y, width, height } =
Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
@ -707,7 +714,7 @@ class WorkspacesDisplay extends St.Widget {
_syncWorkspacesActualGeometry() {
const primaryView = this._getPrimaryView();
if (!primaryView)
if (!primaryView || this._inWindowFade)
return;
primaryView.ease({