From 22d0a673d7d6049d388847b476df1e5b6f3d6b70 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 27 Apr 2012 13:26:04 -0500 Subject: Check for tsak presence on lock engage Fix tsak not exiting on request Clean up build warnings --- kdesktop/lock/lockprocess.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'kdesktop/lock/lockprocess.cc') diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 2b47661db..f33040b85 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -1635,6 +1635,18 @@ bool LockProcess::checkPass() if (trinity_desktop_lock_closing_windows) return 0; + if (trinity_desktop_lock_use_sak) { + // Verify SAK operational status + KProcess* checkSAKProcess = new KProcess; + *checkSAKProcess << "tdmtsak" << "check"; + checkSAKProcess->start(KProcess::Block, KProcess::NoCommunication); + int retcode = checkSAKProcess->exitStatus(); + delete checkSAKProcess; + if (retcode != 0) { + trinity_desktop_lock_use_sak = false; + } + } + if (trinity_desktop_lock_use_sak) { // Wait for SAK press before continuing... SAKDlg inDlg( this ); -- cgit v1.2.1