From f72f501931bd032e2699ff6ceb5228fb3daec094 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 18 Mar 2013 01:14:44 -0400 Subject: [PATCH] unlockDialog: ignore resets after success GDM sends a reset signal after verification succeeds so that a user-switched login screen can prepare for the next time it's going to be used. The unlock screen treats resets as failures, though. This means, on success, we're emitting "failed" and clearing any last second messages. This commit changes the unlock code to ignore resets from GDM after successful verification. https://bugzilla.gnome.org/show_bug.cgi?id=694688 --- js/ui/unlockDialog.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 70452a8de..f9227a34c 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -47,6 +47,7 @@ const UnlockDialog = new Lang.Class({ this._greeterClient = new Gdm.Client(); this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient, { reauthenticationOnly: true }); + this._userVerified = false; this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion)); this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage)); @@ -250,18 +251,22 @@ const UnlockDialog = new Lang.Class({ }, _onVerificationComplete: function() { + this._userVerified = true; this._userVerifier.clear(); this.emit('unlocked'); }, _onReset: function() { - this._userVerifier.clear(); - this.emit('failed'); + if (!this._userVerified) { + this._userVerifier.clear(); + this.emit('failed'); + } }, _onVerificationFailed: function() { this._currentQuery = null; this._firstQuestion = true; + this._userVerified = false; this._promptEntry.text = ''; this._promptEntry.clutter_text.set_password_char('\u25cf');