89 lines
2.3 KiB
Diff
89 lines
2.3 KiB
Diff
From 7a96d259209297b4fad57352abae0a45e7b192fc Mon Sep 17 00:00:00 2001
|
|
From: Ray Strode <rstrode@redhat.com>
|
|
Date: Fri, 8 Oct 2021 11:08:17 -0400
|
|
Subject: [PATCH 1/2] unlockDialog: Don't create AuthDialog just to finish it
|
|
|
|
If the the unlock dialog gets finished before an auth dialog is
|
|
created, the code currently creates one just to tell it to finish.
|
|
|
|
This commit changes the code to skip creating the auth dialog in
|
|
that case.
|
|
---
|
|
js/ui/unlockDialog.js | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
|
|
index 370385abc..f4c76c41a 100644
|
|
--- a/js/ui/unlockDialog.js
|
|
+++ b/js/ui/unlockDialog.js
|
|
@@ -845,61 +845,65 @@ var UnlockDialog = GObject.registerClass({
|
|
}
|
|
|
|
if (this._gdmClient) {
|
|
this._gdmClient = null;
|
|
delete this._gdmClient;
|
|
}
|
|
|
|
if (this._userLoadedId) {
|
|
this._user.disconnect(this._userLoadedId);
|
|
this._userLoadedId = 0;
|
|
}
|
|
|
|
if (this._userSwitchEnabledId) {
|
|
this._screenSaverSettings.disconnect(this._userSwitchEnabledId);
|
|
this._userSwitchEnabledId = 0;
|
|
}
|
|
}
|
|
|
|
_updateUserSwitchVisibility() {
|
|
this._otherUserButton.visible = this._userManager.can_switch() &&
|
|
this._screenSaverSettings.get_boolean('user-switch-enabled') &&
|
|
!this._lockdownSettings.get_boolean('disable-user-switching');
|
|
}
|
|
|
|
cancel() {
|
|
if (this._authPrompt)
|
|
this._authPrompt.cancel();
|
|
}
|
|
|
|
finish(onComplete) {
|
|
- this._ensureAuthPrompt();
|
|
+ if (!this._authPrompt) {
|
|
+ onComplete();
|
|
+ return;
|
|
+ }
|
|
+
|
|
this._authPrompt.finish(onComplete);
|
|
}
|
|
|
|
open(timestamp) {
|
|
this.show();
|
|
|
|
if (this._isModal)
|
|
return true;
|
|
|
|
let modalParams = {
|
|
timestamp,
|
|
actionMode: Shell.ActionMode.UNLOCK_SCREEN,
|
|
};
|
|
if (!Main.pushModal(this, modalParams))
|
|
return false;
|
|
|
|
this._isModal = true;
|
|
|
|
return true;
|
|
}
|
|
|
|
activate() {
|
|
this._showPrompt();
|
|
}
|
|
|
|
popModal(timestamp) {
|
|
if (this._isModal) {
|
|
Main.popModal(this, timestamp);
|
|
this._isModal = false;
|
|
}
|
|
--
|
|
2.31.1
|
|
|