summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-07-17 04:01:59 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-07-17 04:01:59 +0800
commit3fb157ec9bb10f57d87b2cb3847cfa9dc1e5d216 (patch)
treefa630fc4d1f7768263b38a6d26b595f7354be9c9
parent3bc653b212719083344613a2caf33394db237dca (diff)
downloadlocker-3fb157ec9bb10f57d87b2cb3847cfa9dc1e5d216.tar.gz
locker-3fb157ec9bb10f57d87b2cb3847cfa9dc1e5d216.tar.bz2
Fix TimerTrigger
-rw-r--r--src/locker.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/locker.cpp b/src/locker.cpp
index 81ddbb5..5dfcf56 100644
--- a/src/locker.cpp
+++ b/src/locker.cpp
@@ -400,9 +400,6 @@ LockerScreen::wake ()
unlock ();
else
{
- //mWaitTimer.setTimes (30000, 30000);
- //mWaitTimer.start ();
-
if (lockWindow)
lockWindow->show ();
@@ -581,6 +578,8 @@ TimerTrigger::unlocked ()
{
mTimer.setTimes (mTimeout * 1000, mTimeout * 1000);
mTimer.start ();
+
+ mLocked = false;
}
bool
@@ -614,7 +613,10 @@ TimerTrigger::processEvent (XEvent *event)
case KeyPress:
case KeyRelease:
case MotionNotify:
- lockable->wake ();
+ if (lockable && mLocked)
+ lockable->wake ();
+ else
+ mTimer.setTimes (mTimeout * 1000, mTimeout * 1000);
break;
}
}