summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockprocess.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-06 20:48:44 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-06 20:48:44 -0500
commitdc41de959b6b76263f8640c4075a6ed5b873b722 (patch)
tree1077a521b7adde84677d190f81f17e581dbb80ac /kdesktop/lock/lockprocess.h
parent65ea5f153b83d2a30c667ac8b32708309c7ed173 (diff)
downloadtdebase-dc41de959b6b76263f8640c4075a6ed5b873b722.tar.gz
tdebase-dc41de959b6b76263f8640c4075a6ed5b873b722.zip
Use threading and select instead of busywaiting on the lock control socket
This resolves the remainder of Bug 690
Diffstat (limited to 'kdesktop/lock/lockprocess.h')
-rw-r--r--kdesktop/lock/lockprocess.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/kdesktop/lock/lockprocess.h b/kdesktop/lock/lockprocess.h
index e1b8fcf52..3ef08c91b 100644
--- a/kdesktop/lock/lockprocess.h
+++ b/kdesktop/lock/lockprocess.h
@@ -22,12 +22,14 @@
#include <tqmessagebox.h>
#include <tqpixmap.h>
#include <tqdatetime.h>
+#include <tqthread.h>
#include <X11/Xlib.h>
class KLibrary;
class KWinModule;
class KSMModalDialog;
+class LockProcess;
struct GreeterPluginHandle {
KLibrary *library;
@@ -43,6 +45,28 @@ typedef TQValueList<Window> TQXLibWindowList;
//===========================================================================
//
+// Control pipe handler
+//
+class ControlPipeHandlerObject : public TQObject
+{
+ Q_OBJECT
+
+ public:
+ ControlPipeHandlerObject();
+ ~ControlPipeHandlerObject();
+
+ public slots:
+ void run();
+
+ signals:
+ void processCommand(TQString);
+
+ public:
+ LockProcess* mParent;
+};
+
+//===========================================================================
+//
// Screen saver handling process. Handles screensaver window,
// starting screensaver hacks, and password entry.
//
@@ -74,7 +98,6 @@ public slots:
void quitSaver();
void preparePopup();
void cleanupPopup();
- void checkPipe();
void desktopResized();
void doDesktopResizeFinish();
void doFunctionKeyBroadcast();
@@ -101,6 +124,7 @@ private slots:
void repaintRootWindowIfNeeded();
void startSecureDialog();
void slotMouseActivity(XEvent *event);
+ void processInputPipeCommand(TQString command);
private:
void configure();
@@ -121,7 +145,6 @@ private:
bool startHack();
void stopHack();
void setupSignals();
- void setupPipe();
bool checkPass();
void stayOnTop();
void lockXF86();
@@ -215,6 +238,11 @@ private:
int m_dialogPrevY;
TQWidget* m_maskWidget;
+
+ ControlPipeHandlerObject* mControlPipeHandler;
+ TQEventLoopThread* mControlPipeHandlerThread;
+
+ friend class ControlPipeHandlerObject;
};
#endif