From e8d452420d80f34c767bffc98303c0769da54ed5 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 7 Oct 2014 14:30:34 -0400 Subject: [PATCH] gdm: fix sensitivity of auth prompt when cancelling early and user list is disabled If the user list is disabled and the user clicks cancel quickly enough after typing their username, they can get in a state where the auth prompt gets stuck in the insensitive state. This is because the login dialog code makes the prompt insensitive while while pam is processing the provided username, but the prompt only makes itself sensitive again when it is hidden. This commit makes it sensitive right before asking for a username again. --- js/gdm/loginDialog.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index b4487e6..893ab31 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -685,60 +685,62 @@ const LoginDialog = new Lang.Class({ // Translators: this message is shown below the username entry field // to clue the user in on how to login to the local network realm this._authPrompt.setMessage(_("(e.g., user or %s)").format(hint), GdmUtil.MessageType.HINT); }, _askForUsernameAndBeginVerification: function() { this._authPrompt.setPasswordChar(''); this._authPrompt.setQuestion(_("Username: ")); let realmManager = new Realmd.Manager(); let realmSignalId = realmManager.connect('login-format-changed', Lang.bind(this, this._showRealmLoginHint)); this._showRealmLoginHint(realmManager.loginFormat); let nextSignalId = this._authPrompt.connect('next', Lang.bind(this, function() { this._authPrompt.disconnect(nextSignalId); this._authPrompt.updateSensitivity(false); let answer = this._authPrompt.getAnswer(); this._user = this._userManager.get_user(answer); this._authPrompt.clear(); this._authPrompt.startSpinning(); this._authPrompt.begin({ userName: answer }); this._updateCancelButton(); realmManager.disconnect(realmSignalId) realmManager.release(); })); this._updateCancelButton(); + + this._authPrompt.updateSensitivity(true); this._showPrompt(); }, _startSession: function(serviceName) { Tweener.addTween(this.actor, { opacity: 0, time: _FADE_ANIMATION_TIME, transition: 'easeOutQuad', onUpdate: function() { let children = Main.layoutManager.uiGroup.get_children(); for (let i = 0; i < children.length; i++) { if (children[i] != Main.layoutManager.screenShieldGroup) children[i].opacity = this.actor.opacity; } }, onUpdateScope: this, onComplete: function() { Mainloop.idle_add(Lang.bind(this, function() { this._greeter.call_start_session_when_ready_sync(serviceName, true, null); return false; })); }, onCompleteScope: this }); }, _onSessionOpened: function(client, serviceName) { this._authPrompt.finish(Lang.bind(this, function() { this._startSession(serviceName); })); -- 1.8.3.1