[gnome-shell] loginDialog: Ensure timed login indicator is hidden on key presses



commit d7aba2dece6fdcd9d1fb5e73985d3474f30046cc
Author: verdre <gitlab v0yd nl>
Date:   Tue Apr 17 14:30:05 2018 +0200

    loginDialog: Ensure timed login indicator is hidden on key presses
    
    The timed login feature currently cancels the timed login operation when
    a user presses a key but, oddly, only hides the indicator when the user
    releases the key. This means that if a user holds down a key that
    doesn't key repeat, the timed login indicator will continue to run after
    the timed login operation is cancelled.
    
    This commit address the problem by ensuring the timed login indicator is
    hidden on any key press event, at the same time the timed login
    operation is canceled.

 js/gdm/loginDialog.js | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 4a93545af..3470bf749 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -1073,18 +1073,13 @@ var LoginDialog = new Lang.Class({
     _onTimedLoginRequested(client, userName, seconds) {
         this._startTimedLogin(userName, seconds);
 
+        // Restart timed login on user interaction
         global.stage.connect('captured-event', (actor, event) => {
            if (this._timedLoginDelay == undefined)
                return Clutter.EVENT_PROPAGATE;
 
            if (event.type() == Clutter.EventType.KEY_PRESS ||
                event.type() == Clutter.EventType.BUTTON_PRESS) {
-               if (this._timedLoginBatch) {
-                   this._timedLoginBatch.cancel();
-                   this._timedLoginBatch = null;
-               }
-           } else if (event.type() == Clutter.EventType.KEY_RELEASE ||
-                      event.type() == Clutter.EventType.BUTTON_RELEASE) {
                this._resetTimedLogin();
            }
 


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