summaryrefslogtreecommitdiffstats
path: root/kdesktop/lockeng.h
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2015-04-12 16:34:00 -0500
committerTimothy Pearson <[email protected]>2015-04-12 16:34:00 -0500
commit85126bf580edb675048843910c0e0c1c56c9ff89 (patch)
treeff20456bfbf57b108f2e105713694d530194cdc9 /kdesktop/lockeng.h
parent751c96f9b1fc01675a1a9d34831104f98adfd84f (diff)
downloadtdebase-85126bf580edb675048843910c0e0c1c56c9ff89.tar.gz
tdebase-85126bf580edb675048843910c0e0c1c56c9ff89.zip
Fix sporadic kdesktop hang due to unsafe usage of asynchronous POSIX signals in the main GUI thread
Diffstat (limited to 'kdesktop/lockeng.h')
-rw-r--r--kdesktop/lockeng.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/kdesktop/lockeng.h b/kdesktop/lockeng.h
index 782f779a3..9827090b4 100644
--- a/kdesktop/lockeng.h
+++ b/kdesktop/lockeng.h
@@ -9,6 +9,7 @@
#define __LOCKENG_H__
#include <tqwidget.h>
+#include <tqthread.h>
#include <kprocess.h>
#include <tqvaluevector.h>
#include "KScreensaverIface.h"
@@ -21,6 +22,20 @@ class DCOPClientTransaction;
class TQT_DBusMessage;
class TQT_DBusProxy;
+class SaverEngineThreadHelperObject : public TQObject
+{
+ Q_OBJECT
+
+public slots:
+ void terminateThread();
+ void slotLockProcessWaiting();
+ void slotLockProcessFullyActivated();
+
+signals:
+ void lockProcessWaiting();
+ void lockProcessFullyActivated();
+};
+
//===========================================================================
/**
* Screen saver engine. Handles screensaver window, starting screensaver
@@ -91,16 +106,19 @@ public:
*/
bool waitForLockEngage();
+signals:
+ void terminateHelperThread();
+ void asyncLock();
+
public slots:
- void slotLockProcessWaiting();
- void slotLockProcessFullyActivated();
void slotLockProcessReady();
+ void lockProcessWaiting();
+ void lockProcessFullyActivated();
void handleDBusSignal(const TQT_DBusMessage&);
protected slots:
void idleTimeout();
void lockProcessExited();
- void lockProcessWaiting();
private slots:
void handleSecureDialog();
@@ -148,7 +166,12 @@ protected:
bool mBlankOnly; // only use the blanker, not the defined saver
TQValueVector< DCOPClientTransaction* > mLockTransactions;
+public:
+ SaverEngineThreadHelperObject* m_threadHelperObject;
+
private:
+ TQEventLoopThread* m_helperThread;
+ sigset_t mThreadBlockSet;
TDEProcess* mSAKProcess;
bool mTerminationRequested;
bool mSaverProcessReady;