mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
polkitAgent: Hide authentication dialogs while locked
Since commit 78a92fb6be we no longer pop up authentication dialogs
on the lock screen, however any dialog that is already open at that
time remains open. This is unexpected, so hide the dialog until
the screen is unlocked again.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/166
This commit is contained in:
parent
09d3cdb023
commit
cb4252e888
1 changed files with 10 additions and 0 deletions
|
|
@ -40,6 +40,10 @@ var AuthenticationDialog = new Lang.Class({
|
|||
this.userNames = userNames;
|
||||
this._wasDismissed = false;
|
||||
|
||||
this._sessionUpdatedId = Main.sessionMode.connect('updated', () => {
|
||||
this._group.visible = !Main.sessionMode.isLocked;
|
||||
});
|
||||
|
||||
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
||||
let title = _("Authentication Required");
|
||||
|
||||
|
|
@ -194,6 +198,12 @@ var AuthenticationDialog = new Lang.Class({
|
|||
this._session.initiate();
|
||||
},
|
||||
|
||||
close(timestamp) {
|
||||
this.parent(timestamp);
|
||||
|
||||
Main.sessionMode.disconnect(this._sessionUpdatedId);
|
||||
},
|
||||
|
||||
_ensureOpen() {
|
||||
// NOTE: ModalDialog.open() is safe to call if the dialog is
|
||||
// already open - it just returns true without side-effects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue