From cf47b4a34733d8be29a49eca46abca0c4b94b44c Mon Sep 17 00:00:00 2001 From: Alessandro Bono Date: Sun, 6 Nov 2022 12:17:15 +0100 Subject: [PATCH] overview: Start animation after setting coverPane initial state Since commit 7bd98f3f5fb7e0d1220646b8a4ee7073534a8e8f the onComplete callback is called right away when animations are disabled. As side effect, now this._coverPane gets shown/hidden in the wrong order. Start the animation after setting this._coverPane initial state, so that the animation callback can set the this._coverPane final state without it being overwritten later. Move the animation also after emitting the showing and hiding signals. So that the order showing -> shown and hiding -> hidden is still preserved when animations are disabled. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6096 Part-of: --- js/ui/overview.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/ui/overview.js b/js/ui/overview.js index 98b1fa8f7..dc6ca5780 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -519,13 +519,13 @@ var Overview = class extends Signals.EventEmitter { Meta.disable_unredirect_for_display(global.display); - this._overview.prepareToEnterOverview(); - this._overview.animateToOverview(state, () => this._showDone()); - Main.layoutManager.overviewGroup.set_child_above_sibling( this._coverPane, null); this._coverPane.show(); + + this._overview.prepareToEnterOverview(); this.emit('showing'); + this._overview.animateToOverview(state, () => this._showDone()); } _showDone() { @@ -573,13 +573,13 @@ var Overview = class extends Signals.EventEmitter { this._animationInProgress = true; this._visibleTarget = false; - this._overview.prepareToLeaveOverview(); - this._overview.animateFromOverview(() => this._hideDone()); - Main.layoutManager.overviewGroup.set_child_above_sibling( this._coverPane, null); this._coverPane.show(); + + this._overview.prepareToLeaveOverview(); this.emit('hiding'); + this._overview.animateFromOverview(() => this._hideDone()); } _hideDone() {