[gnome-shell/wip/wayland-gdm-cleanup: 6/19] gdm: Correct placement of verification-failed emission



commit 82b8b323554a2f5292e6dd8db5ee25e3ab463b9f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Mar 7 18:45:21 2014 -0500

    gdm: Correct placement of verification-failed emission
    
    If we fail to verify, and don't have any pending messages, we'll retry
    or cancel, which will cause a state change to VERIFYING or NOT_VERIFYING,
    and then change the state again to VERIFICATION_FAILED, messing up our
    state machine.

 js/gdm/util.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/util.js b/js/gdm/util.js
index 0a307f4..9b23f0c 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -501,6 +501,8 @@ const ShellUserVerifier = new Lang.Class({
         let canRetry = retry && this._userName &&
             this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
 
+        this.emit('verification-failed');
+
         if (canRetry) {
             if (!this.hasPendingMessages) {
                 this._retry();
@@ -522,8 +524,6 @@ const ShellUserVerifier = new Lang.Class({
                                             }));
             }
         }
-
-        this.emit('verification-failed');
     },
 
     _onConversationStopped: function(client, serviceName) {


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