summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-17 07:28:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-17 07:28:33 +0000
commitc8ff4ef743f03d015db000d6f44b4249575c390f (patch)
treec38b9a2b62f96add39a272609cca1199d6b247b2 /kdesktop
parente02b61406170e347f2cd4e5f56d101310bc746a6 (diff)
downloadtdebase-c8ff4ef743f03d015db000d6f44b4249575c390f.tar.gz
tdebase-c8ff4ef743f03d015db000d6f44b4249575c390f.zip
Disable SAK key detection in kdesktop when the lock dialog is active
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1254063 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 );
}