[gnome-shell] workspacesView: Really don't animate primary view when fading
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Really don't animate primary view when fading
- Date: Mon, 13 Jul 2020 17:34:27 +0000 (UTC)
commit ed4baec40faf84f06681d84205f87433c04e5117
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jul 11 18:19:27 2020 +0200
workspacesView: Really don't animate primary view when fading
In commit 9297d87775d64 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
js/ui/workspacesView.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index c74c6e9c7e..c3ad4b6cf0 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -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({
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]