gdm: Override any other lower-priority service message on error

When we got an error, all the other HINT or INFO messages are not useful
anymore and delaying to show them is just a waste of time and may be
even wrong in scenarios with fast authentication devices.

An example are the fingerprint devices, where the user may touch the
sensor repeatedly while we may still show the "touch the sensor" hint
instead of notifying of possible errors.

So, in case we got an error override all the other errors coming from
the same service with lower priority.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>
This commit is contained in:
Marco Trevisan (Treviño) 2021-02-16 03:56:09 +01:00 committed by Ray Strode
parent 45a5171a95
commit b74900b3a3

View File

@ -603,7 +603,8 @@ var ShellUserVerifier = class {
if (!this.serviceIsForeground(serviceName) && !isFingerprint) if (!this.serviceIsForeground(serviceName) && !isFingerprint)
return; return;
this._queueMessage(serviceName, problem, MessageType.ERROR); this._queuePriorityMessage(serviceName, problem, MessageType.ERROR);
if (isFingerprint) { if (isFingerprint) {
// pam_fprintd allows the user to retry multiple (maybe even infinite! // pam_fprintd allows the user to retry multiple (maybe even infinite!
// times before failing the authentication conversation. // times before failing the authentication conversation.