[gnome-shell] windowManager: Animate the appearance of new windows after overview closes
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowManager: Animate the appearance of new windows after overview closes
- Date: Thu, 19 Aug 2021 11:57:57 +0000 (UTC)
commit 88b2c9a046170d150e41f929810b8fa9f5198ca6
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Thu Sep 17 15:25:49 2020 +0800
windowManager: Animate the appearance of new windows after overview closes
So that the animation doesn't get skipped if the overview is visible but
in the process of closing.
In this case the overview being visible also means that it is closing,
because if it's visible and not already closing then `_shouldAnimateActor`
would have returned false and exited `_mapWindow` earlier.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1814,
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3242
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1440>
js/ui/windowManager.js | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 2ded682362..48fa9a5934 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1446,7 +1446,19 @@ var WindowManager = class {
dimmer.setDimmed(false, this._shouldAnimate());
}
- _mapWindow(shellwm, actor) {
+ _waitForOverviewToHide() {
+ if (!Main.overview.visible)
+ return Promise.resolve();
+
+ return new Promise(resolve => {
+ const id = Main.overview.connect('hidden', () => {
+ Main.overview.disconnect(id);
+ resolve();
+ });
+ });
+ }
+
+ async _mapWindow(shellwm, actor) {
actor._windowType = actor.meta_window.get_window_type();
actor._notifyWindowTypeSignalId =
actor.meta_window.connect('notify::window-type', () => {
@@ -1488,6 +1500,7 @@ var WindowManager = class {
actor.show();
this._mapping.add(actor);
+ await this._waitForOverviewToHide();
actor.ease({
opacity: 255,
scale_x: 1,
@@ -1505,6 +1518,7 @@ var WindowManager = class {
actor.show();
this._mapping.add(actor);
+ await this._waitForOverviewToHide();
actor.ease({
opacity: 255,
scale_x: 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]