diff options
Diffstat (limited to 'Locker.py')
-rw-r--r-- | Locker.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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() |