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>
This commit is contained in:
parent
956db078c3
commit
88b2c9a046
@ -1446,7 +1446,19 @@ var WindowManager = class {
|
|||||||
dimmer.setDimmed(false, this._shouldAnimate());
|
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._windowType = actor.meta_window.get_window_type();
|
||||||
actor._notifyWindowTypeSignalId =
|
actor._notifyWindowTypeSignalId =
|
||||||
actor.meta_window.connect('notify::window-type', () => {
|
actor.meta_window.connect('notify::window-type', () => {
|
||||||
@ -1488,6 +1500,7 @@ var WindowManager = class {
|
|||||||
actor.show();
|
actor.show();
|
||||||
this._mapping.add(actor);
|
this._mapping.add(actor);
|
||||||
|
|
||||||
|
await this._waitForOverviewToHide();
|
||||||
actor.ease({
|
actor.ease({
|
||||||
opacity: 255,
|
opacity: 255,
|
||||||
scale_x: 1,
|
scale_x: 1,
|
||||||
@ -1505,6 +1518,7 @@ var WindowManager = class {
|
|||||||
actor.show();
|
actor.show();
|
||||||
this._mapping.add(actor);
|
this._mapping.add(actor);
|
||||||
|
|
||||||
|
await this._waitForOverviewToHide();
|
||||||
actor.ease({
|
actor.ease({
|
||||||
opacity: 255,
|
opacity: 255,
|
||||||
scale_x: 1,
|
scale_x: 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user