diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 493429000..43798b3b4 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -29,6 +29,7 @@ var AuthPromptStatus = { VERIFYING: 1, VERIFICATION_FAILED: 2, VERIFICATION_SUCCEEDED: 3, + VERIFICATION_CANCELLED: 4, }; var BeginRequestType = { @@ -479,12 +480,16 @@ var AuthPrompt = GObject.registerClass({ if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED) this.emit('failed'); + else if (oldStatus === AuthPromptStatus.VERIFICATION_CANCELLED) + this.emit('cancelled'); let beginRequestType; if (this._mode == AuthPromptMode.UNLOCK_ONLY) { // The user is constant at the unlock screen, so it will immediately // respond to the request with the username + if (oldStatus === AuthPromptStatus.VERIFICATION_CANCELLED) + return; beginRequestType = BeginRequestType.PROVIDE_USERNAME; } else if (this._userVerifier.serviceIsForeground(OVirt.SERVICE_NAME) || this._userVerifier.serviceIsForeground(Vmware.SERVICE_NAME) || @@ -540,7 +545,7 @@ var AuthPrompt = GObject.registerClass({ if (this.verificationStatus == AuthPromptStatus.VERIFICATION_SUCCEEDED) return; + this.verificationStatus = AuthPromptStatus.VERIFICATION_CANCELLED; this.reset(); - this.emit('cancelled'); } });