diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-10-10 18:44:33 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-10-10 18:44:33 +0200 |
commit | 76532c49651a372a25010bc7f7f8b60eeebefdfd (patch) | |
tree | 59dedca7ca08082e396e6ee5ec2d50f852f0728a | |
parent | 115b2257a506f21f7e069fdbba49ac001292d79b (diff) | |
download | pylock-76532c49651a372a25010bc7f7f8b60eeebefdfd.tar pylock-76532c49651a372a25010bc7f7f8b60eeebefdfd.zip |
Re-grab focus after failed login attempt
-rw-r--r-- | LockWindow.py | 10 | ||||
-rw-r--r-- | pylock.py | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/LockWindow.py b/LockWindow.py index d6f6ae3..97a8611 100644 --- a/LockWindow.py +++ b/LockWindow.py @@ -76,7 +76,7 @@ class LockWindow(Gtk.Window): self.logoutButton.connect('clicked', lambda w: self._logout()) self.unlockButton.connect('clicked', lambda w: self._tryUnlock()) - self.reset(True) + self.reset(False, True) self.deviceManager = self.display.get_device_manager() @@ -100,7 +100,7 @@ class LockWindow(Gtk.Window): self.logoutButton.set_sensitive(self._enableLogoutButton) self.unlockButton.set_sensitive(self._enableUnlockButton) - def reset(self, resetButtons = False): + def reset(self, regrab = True, resetButtons = False): if resetButtons: self._enablePromptEntry = True self._enableLogoutButton = False @@ -110,8 +110,8 @@ class LockWindow(Gtk.Window): self.messageLabel.set_label('') self._update() - self.promptEntry.grab_focus() - + if regrab: + self._grabDevices(None, None) def updateLockMessage(self, username, logoutTime = None): if logoutTime is None: @@ -153,4 +153,4 @@ class LockWindow(Gtk.Window): self._ungrabDevices() self.hide() - self.reset(True) + self.reset(False, True) @@ -99,7 +99,7 @@ def logout(): except: pass - window.reset() + window.reset(False) def updateTimeout(timeLeft): window.updateLockMessage(args.username, timeLeft) |