summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LockWindow.py10
-rw-r--r--pylock.py2
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)
diff --git a/pylock.py b/pylock.py
index f4841cd..159b7d2 100644
--- a/pylock.py
+++ b/pylock.py
@@ -99,7 +99,7 @@ def logout():
except:
pass
- window.reset()
+ window.reset(False)
def updateTimeout(timeLeft):
window.updateLockMessage(args.username, timeLeft)