summaryrefslogtreecommitdiffstats
path: root/Locker.py
diff options
context:
space:
mode:
Diffstat (limited to 'Locker.py')
-rw-r--r--Locker.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Locker.py b/Locker.py
index 2af8f70..04edb13 100644
--- a/Locker.py
+++ b/Locker.py
@@ -50,3 +50,10 @@ class Locker(object):
self.locked = False
GLib.timeout_add_seconds(1, self._checkLock)
+
+ def _canLogout(self):
+ return (self.locked and self.doLogout is not None and self.currentLogoutTimeout <= 0)
+
+ def logout(self):
+ if self._canLogout():
+ self.doLogout()