summaryrefslogtreecommitdiffstats
path: root/Locker.py
diff options
context:
space:
mode:
Diffstat (limited to 'Locker.py')
-rw-r--r--Locker.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Locker.py b/Locker.py
index fd2f5ed..0f10fe0 100644
--- a/Locker.py
+++ b/Locker.py
@@ -66,7 +66,10 @@ class Locker(object):
def lock(self):
if not self.locked:
self.locked = True
- self.doLock(self.logoutTimeout)
+ if not self.doLock(self.logoutTimeout):
+ self.locked = False
+ GLib.timeout_add_seconds(1, self._checkLock)
+ return False
if self.doLogout is not None:
self.currentLogoutTimeout = self.logoutTimeout
@@ -74,6 +77,8 @@ class Locker(object):
if self.currentLogoutTimeout > 0:
GLib.timeout_add_seconds(1, self._checkLogout)
+ return True
+
def unlock(self):
if self.locked:
self.doUnlock()