layout: Add work-around for testing greeter UI in nested

Testing the greeter UI in nested has been broken for a long time
now, because the backend isn't ready yet when we try to push a
modal (via the screen shield).

As running nested is only relevant for development and testing,
working around the issue rather than fixing it properly seems
fine, so do just that and slightly delay startup when testing
the greeter UI.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2573>
This commit is contained in:
Florian Müllner 2022-12-02 20:52:44 +01:00
parent b286a8f55e
commit 4e48f94e47

View File

@ -745,6 +745,10 @@ var LayoutManager = GObject.registerClass({
await this._updateBackgrounds();
}
// Hack: Work around grab issue when testing greeter UI in nested
if (GLib.getenv('GDM_GREETER_TEST') === '1')
setTimeout(() => this.emit('startup-prepared'), 200);
else
this.emit('startup-prepared');
this._startupAnimation();