summaryrefslogtreecommitdiffstats
path: root/x11/gnome-shell/files/patch-js_gdm_loginDialog.js
blob: 826af5f8b034e068e7ca6adb425a8e48a9f395c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- js/gdm/loginDialog.js.orig  2012-03-24 21:19:24.000000000 -0500
+++ js/gdm/loginDialog.js   2012-03-24 21:21:23.000000000 -0500
@@ -301,11 +301,17 @@
         this.actor.connect('key-focus-in', Lang.bind(this, this._moveFocusToItems));
     },
 
-    _moveFocusToItems: function() {
-        let hasItems = Object.keys(this._items).length > 0;
+    _hasItems: function() {
+        for (let userName in this._items) {
+            return true;
+        }
+        return false;
+    },
 
-        if (!hasItems)
+    _moveFocusToItems: function() {
+        if (!this._hasItems()) {
             return;
+        }
 
         if (global.stage.get_key_focus() != this.actor)
             return;