[gnome-shell/wip/rstrode/fix-double-escape-at-unlock-screen] unlockDialog: Properly reset auth prompt when showing it




commit c13e7c723e570ef6dad09516b4894bdad41e34e6
Author: Ray Strode <rstrode redhat com>
Date:   Tue Oct 5 11:01:19 2021 -0400

    unlockDialog: Properly reset auth prompt when showing it
    
    If a user hits escape twice really fast when coming back to
    their machine to unlock it, they made end up getting presented
    with a non-functional unlock screen that doesn't show their
    user icon and doesn't ask for a password.
    
    This is because showPrompt assumes that if an auth prompt already
    exists, it's ready to go. That may not be true, if it's in the
    process of getting torn down at the time because it's in the middle
    of a cancel animation.
    
    This commit solves the problem by reseting the auth prompt before
    using it in showPrompt.

 js/ui/unlockDialog.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 370385abc4..eb2b99ebb3 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -718,7 +718,10 @@ var UnlockDialog = GObject.registerClass({
     }
 
     _showPrompt() {
-        this._ensureAuthPrompt();
+        if (this._authPrompt)
+            this._authPrompt.reset();
+        else
+            this._ensureAuthPrompt();
 
         if (this._activePage === this._promptBox)
             return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]