From 4e48f94e4771f25cf70a35f36f1524df77a63038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 2 Dec 2022 20:52:44 +0100 Subject: [PATCH] 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: --- js/ui/layout.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index ed09c8f83..d7f73dcac 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -745,7 +745,11 @@ var LayoutManager = GObject.registerClass({ await this._updateBackgrounds(); } - this.emit('startup-prepared'); + // 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(); }