summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/lockeng.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc
index 0612860a7..62e4855a9 100644
--- a/kdesktop/lockeng.cc
+++ b/kdesktop/lockeng.cc
@@ -83,6 +83,7 @@ void SaverEngine::lock()
bool ok = true;
if (mState == Waiting)
{
+ mSAKProcess->kill(SIGTERM);
ok = startLockProcess( ForceLock );
// It takes a while for kdesktop_lock to start and lock the screen.
// Therefore delay the DCOP call until it tells kdesktop that the locking is in effect.
@@ -127,6 +128,7 @@ void SaverEngine::save()
{
if (mState == Waiting)
{
+ mSAKProcess->kill(SIGTERM);
startLockProcess( DefaultLock );
}
}
@@ -208,9 +210,9 @@ void SaverEngine::handleSecureDialog()
void SaverEngine::slotSAKProcessExited()
{
int retcode = mSAKProcess->exitStatus();
- if (retcode != 0) trinity_lockeng_sak_available = FALSE;
+ if ((retcode != 0) && (mSAKProcess->normalExit())) trinity_lockeng_sak_available = FALSE;
- if (trinity_lockeng_sak_available == TRUE) {
+ if ((mSAKProcess->normalExit()) && (trinity_lockeng_sak_available == TRUE)) {
bool ok = true;
if (mState == Waiting)
{
@@ -384,6 +386,7 @@ void SaverEngine::idleTimeout()
// disable X screensaver
XForceScreenSaver(qt_xdisplay(), ScreenSaverReset );
XSetScreenSaver(qt_xdisplay(), 0, mXInterval, PreferBlanking, DontAllowExposures);
+ mSAKProcess->kill(SIGTERM);
startLockProcess( DefaultLock );
}