$OpenBSD: patch-js_gdm_loginDialog_js,v 1.3 2021/06/14 18:54:25 jasper Exp $

Index: js/gdm/loginDialog.js
--- js/gdm/loginDialog.js.orig
+++ js/gdm/loginDialog.js
@@ -42,6 +42,7 @@ var UserListItem = GObject.registerClass({
     _init(user) {
         let layout = new St.BoxLayout({
             vertical: true,
+            x_align: Clutter.ActorAlign.START,
         });
         super._init({
             style_class: 'login-dialog-user-list-item',
@@ -762,9 +763,6 @@ var LoginDialog = GObject.registerClass({
 
             if (this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
                 this._authPrompt.reset();
-
-            if (this._disableUserList && this._timedLoginUserListHold)
-                this._timedLoginUserListHold.release();
         }
     }
 
@@ -858,7 +856,6 @@ var LoginDialog = GObject.registerClass({
         this._resetGreeterProxy();
         this._sessionMenuButton.updateSensitivity(true);
 
-        const previousUser = this._user;
         this._user = null;
 
         if (this._nextSignalId) {
@@ -866,11 +863,7 @@ var LoginDialog = GObject.registerClass({
             this._nextSignalId = 0;
         }
 
-        if (previousUser && beginRequest === AuthPrompt.BeginRequestType.REUSE_USERNAME) {
-            this._user = previousUser;
-            this._authPrompt.setUser(this._user);
-            this._authPrompt.begin({ userName: previousUser.get_user_name() });
-        } else if (beginRequest === AuthPrompt.BeginRequestType.PROVIDE_USERNAME) {
+        if (beginRequest == AuthPrompt.BeginRequestType.PROVIDE_USERNAME) {
             if (!this._disableUserList)
                 this._showUserList();
             else
@@ -1051,72 +1044,54 @@ var LoginDialog = GObject.registerClass({
         let loginItem = null;
         let animationTime;
 
-        let tasks = [
-            () => {
-                if (this._disableUserList)
-                    return;
+        let tasks = [() => this._waitForItemForUser(userName),
 
-                this._timedLoginUserListHold = this._waitForItemForUser(userName);
-            },
+                     () => {
+                         loginItem = this._userList.getItemFromUserName(userName);
 
-            () => {
-                this._timedLoginUserListHold = null;
+                         // If there is an animation running on the item, reset it.
+                         loginItem.hideTimedLoginIndicator();
+                     },
 
-                if (this._disableUserList)
-                    loginItem = this._authPrompt;
-                else
-                    loginItem = this._userList.getItemFromUserName(userName);
+                     () => {
+                         // If we're just starting out, start on the right item.
+                         if (!this._userManager.is_loaded)
+                             this._userList.jumpToItem(loginItem);
+                     },
 
-                // If there is an animation running on the item, reset it.
-                loginItem.hideTimedLoginIndicator();
-            },
+                     () => {
+                         // This blocks the timed login animation until a few
+                         // seconds after the user stops interacting with the
+                         // login screen.
 
-            () => {
-                if (this._disableUserList)
-                    return;
+                         // We skip this step if the timed login delay is very short.
+                         if (delay > _TIMED_LOGIN_IDLE_THRESHOLD) {
+                             animationTime = delay - _TIMED_LOGIN_IDLE_THRESHOLD;
+                             return this._blockTimedLoginUntilIdle();
+                         } else {
+                             animationTime = delay;
+                             return null;
+                         }
+                     },
 
-                // If we're just starting out, start on the right item.
-                if (!this._userManager.is_loaded)
-                    this._userList.jumpToItem(loginItem);
-            },
+                     () => {
+                         // If idle timeout is done, make sure the timed login indicator is shown
+                         if (delay > _TIMED_LOGIN_IDLE_THRESHOLD &&
+                             this._authPrompt.visible)
+                             this._authPrompt.cancel();
 
-            () => {
-                // This blocks the timed login animation until a few
-                // seconds after the user stops interacting with the
-                // login screen.
+                         if (delay > _TIMED_LOGIN_IDLE_THRESHOLD || firstRun) {
+                             this._userList.scrollToItem(loginItem);
+                             loginItem.grab_key_focus();
+                         }
+                     },
 
-                // We skip this step if the timed login delay is very short.
-                if (delay > _TIMED_LOGIN_IDLE_THRESHOLD) {
-                    animationTime = delay - _TIMED_LOGIN_IDLE_THRESHOLD;
-                    return this._blockTimedLoginUntilIdle();
-                } else {
-                    animationTime = delay;
-                    return null;
-                }
-            },
+                     () => loginItem.showTimedLoginIndicator(animationTime),
 
-            () => {
-                if (this._disableUserList)
-                    return;
-
-                // If idle timeout is done, make sure the timed login indicator is shown
-                if (delay > _TIMED_LOGIN_IDLE_THRESHOLD &&
-                    this._authPrompt.visible)
-                    this._authPrompt.cancel();
-
-                if (delay > _TIMED_LOGIN_IDLE_THRESHOLD || firstRun) {
-                    this._userList.scrollToItem(loginItem);
-                    loginItem.grab_key_focus();
-                }
-            },
-
-            () => loginItem.showTimedLoginIndicator(animationTime),
-
-            () => {
-                this._timedLoginBatch = null;
-                this._greeter.call_begin_auto_login_sync(userName, null);
-            },
-        ];
+                     () => {
+                         this._timedLoginBatch = null;
+                         this._greeter.call_begin_auto_login_sync(userName, null);
+                     }];
 
         this._timedLoginBatch = new Batch.ConsecutiveBatch(this, tasks);
 
