summaryrefslogtreecommitdiffstats
path: root/kdesktop/lockeng.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/lockeng.cc')
-rw-r--r--kdesktop/lockeng.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc
index 9eb88e1d1..f24d02f9f 100644
--- a/kdesktop/lockeng.cc
+++ b/kdesktop/lockeng.cc
@@ -34,7 +34,7 @@ SaverEngine* m_masterSaverEngine = NULL;
static void sigusr1_handler(int)
{
if (m_masterSaverEngine) {
- m_masterSaverEngine->lockProcessWaiting();
+ m_masterSaverEngine->slotLockProcessWaiting();
}
}
@@ -445,6 +445,13 @@ void SaverEngine::lockProcessExited()
}
}
+void SaverEngine::slotLockProcessWaiting()
+{
+ // lockProcessWaiting cannot be called directly from a signal handler, as it will hang in certain obscure circumstances
+ // Instead we use a single-shot timer to immediately call lockProcessWaiting once control has returned to the Qt main loop
+ TQTimer::singleShot(0, this, SLOT(lockProcessWaiting()));
+}
+
void SaverEngine::lockProcessWaiting()
{
kdDebug(1204) << "SaverEngine: lock exited" << endl;