[gnome-shell/eos3.8: 165/255] payg: Wait for the PaygManager before showing the screenshield's dialog
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/eos3.8: 165/255] payg: Wait for the PaygManager before showing the screenshield's dialog
- Date: Wed, 10 Jun 2020 19:11:51 +0000 (UTC)
commit 5fb80182d9691fd04e064bcebc16e391a4a8f1af
Author: Mario Sanchez Prada <mario endlessm com>
Date: Tue Mar 27 17:24:21 2018 +0100
payg: Wait for the PaygManager before showing the screenshield's dialog
The login screen showed on boot is actually managed by ScreenShield,
which shows it if needed as LoginDialog is set as the unlockDialog for
the 'gdm' session mode. This is a problem with PAYG since we now need
to wait for the PaygManager to be fully initialized before deciding
whether to push an extra session mode on top (to show the PAYG unlock
dialog if needed), so we need to make sure we do that.
https://phabricator.endlessm.com/T21608
js/ui/main.js | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 1d52420779..6e9ba3d04c 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -276,7 +276,17 @@ function _initializeUI() {
if (sessionMode.isGreeter && screenShield) {
layoutManager.connect('startup-prepared', () => {
- screenShield.showDialog();
+ // We can't show the login dialog (which is managed by the
+ // screenshield) until the PaygManager is initializd, since
+ // we need to check whether the machine is PAYG-locked first.
+ if (paygManager.initialized) {
+ screenShield.showDialog();
+ } else {
+ let paygManagerId = paygManager.connect('initialized', () => {
+ screenShield.showDialog();
+ paygManager.disconnect(paygManagerId);
+ });
+ }
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]