diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 7b5d03ef4..d2c9a1659 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -432,8 +432,16 @@ var AuthPrompt = GObject.registerClass({ } if (type === GdmUtil.MessageType.ERROR && - this._userVerifier.serviceIsFingerprint(serviceName)) - Util.wiggle(this._message); + this._userVerifier.serviceIsFingerprint(serviceName)) { + // TODO: Use Await for wiggle to be over before unfreezing the user verifier queue + const wiggleParameters = { + duration: 65, + wiggleCount: 3, + }; + this._userVerifier.increaseCurrentMessageTimeout( + wiggleParameters.duration * (wiggleParameters.wiggleCount + 2)); + Util.wiggle(this._message, wiggleParameters); + } } updateSensitivity(sensitive) { diff --git a/js/gdm/util.js b/js/gdm/util.js index f6a980a2a..1666fd842 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -285,6 +285,11 @@ var ShellUserVerifier = class { this.emit('no-more-messages'); } + increaseCurrentMessageTimeout(interval) { + if (!this._messageQueueTimeoutId && interval > 0) + this._currentMessageExtraInterval = interval; + } + _queueMessageTimeout() { if (this._messageQueue.length == 0) { this.finishMessageQueue(); @@ -296,10 +301,11 @@ var ShellUserVerifier = class { let message = this._messageQueue.shift(); + delete this._currentMessageExtraInterval; this.emit('show-message', message.serviceName, message.text, message.type); this._messageQueueTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, - message.interval, + message.interval + (this._currentMessageExtraInterval | 0), () => { this._messageQueueTimeoutId = 0; this._queueMessageTimeout();