diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-16 07:19:58 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-16 07:19:58 +0000 |
commit | 7b1017d0013a2900b82cdf36bd2a9ef387c9aec5 (patch) | |
tree | b16a72a532f28396dcaa1a6f269cfe92a8c18f0d | |
parent | 96c46c4f95bc317b7742d1569672dc4310e17fe4 (diff) | |
download | tdebase-7b1017d0013a2900b82cdf36bd2a9ef387c9aec5.tar.gz tdebase-7b1017d0013a2900b82cdf36bd2a9ef387c9aec5.zip |
Stabilize the SAK system
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253985 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | kdesktop/lockeng.cc | 5 | ||||
-rw-r--r-- | kdmlib/kdmtsak.cpp | 4 | ||||
-rw-r--r-- | tsak/main.cpp | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc index 49be555f3..0612860a7 100644 --- a/kdesktop/lockeng.cc +++ b/kdesktop/lockeng.cc @@ -223,8 +223,6 @@ void SaverEngine::slotSAKProcessExited() { mLockProcess.kill( SIGHUP ); } - - TQTimer::singleShot( 0, this, TQT_SLOT(handleSecureDialog()) ); } } @@ -372,6 +370,9 @@ void SaverEngine::lockProcessExited() } processLockTransactions(); mState = Waiting; + if (trinity_lockeng_sak_available == TRUE) { + handleSecureDialog(); + } } //--------------------------------------------------------------------------- diff --git a/kdmlib/kdmtsak.cpp b/kdmlib/kdmtsak.cpp index 82155d29c..e1ed9ddc9 100644 --- a/kdmlib/kdmtsak.cpp +++ b/kdmlib/kdmtsak.cpp @@ -36,12 +36,12 @@ int main (int argc, char *argv[]) mPipe_fd = open(FIFO_FILE, O_RDONLY | O_NONBLOCK); numread = 1; while (numread > 0) { - numread = read(mPipe_fd, readbuf, 128); + numread = read(mPipe_fd, readbuf, 6); } // Now wait for SAK press mPipe_fd = open(FIFO_FILE, O_RDONLY); if (mPipe_fd > -1) { - numread = read(mPipe_fd, readbuf, 128); + numread = read(mPipe_fd, readbuf, 6); readbuf[numread] = 0; readbuf[127] = 0; close(mPipe_fd); diff --git a/tsak/main.cpp b/tsak/main.cpp index 087147935..57e228c2e 100644 --- a/tsak/main.cpp +++ b/tsak/main.cpp @@ -330,6 +330,8 @@ int main (int argc, char *argv[]) if (hide_event == true) { // Let anyone listening to our interface know that an SAK keypress was received write(mPipe_fd_out, "SAK\n\r", 6); + write(mPipe_fd_out, "SAK\n\r", 6); + write(mPipe_fd_out, "SAK\n\r", 6); } } } |