[gnome-shell] unlockDialog: ignore resets after success



commit f72f501931bd032e2699ff6ceb5228fb3daec094
Author: Ray Strode <rstrode redhat com>
Date:   Mon Mar 18 01:14:44 2013 -0400

    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 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 70452a8..f9227a3 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');


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]