diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 97b12ef54..e48e422fa 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -120,6 +120,8 @@ var AuthPrompt = GObject.registerClass({ } _onDestroy() { + this._inactiveEntry.destroy(); + this._inactiveEntry = null; this._userVerifier.destroy(); this._userVerifier = null; } @@ -189,6 +191,7 @@ var AuthPrompt = GObject.registerClass({ this._entry = this._passwordEntry; this._mainBox.add_child(this._entry); this._entry.grab_key_focus(); + this._inactiveEntry = this._textEntry; this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator', @@ -278,9 +281,11 @@ var AuthPrompt = GObject.registerClass({ if (secret && this._entry !== this._passwordEntry) { this._mainBox.replace_child(this._entry, this._passwordEntry); this._entry = this._passwordEntry; + this._inactiveEntry = this._textEntry; } else if (!secret && this._entry !== this._textEntry) { this._mainBox.replace_child(this._entry, this._textEntry); this._entry = this._textEntry; + this._inactiveEntry = this._passwordEntry; } this._capsLockWarningLabel.visible = secret; }