summaryrefslogtreecommitdiffstats
path: root/src/tdedocker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tdedocker.cpp')
-rw-r--r--src/tdedocker.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/tdedocker.cpp b/src/tdedocker.cpp
index 2b24cf5..8021e67 100644
--- a/src/tdedocker.cpp
+++ b/src/tdedocker.cpp
@@ -23,7 +23,6 @@
#include <tqfile.h>
#include <tqtextcodec.h>
#include <tqtextstream.h>
-#include <tqtimer.h>
#include <tqstring.h>
#include <tdecmdlineargs.h>
@@ -43,7 +42,21 @@
#define TMPFILE_PREFIX TQString("/tmp/tdedocker.")
TDEDocker::TDEDocker()
- : TDEApplication(), mTrayLabelMgr(NULL), firstSaveState(true)
+ : TDEApplication(), mTrayLabelMgr(NULL)
+{
+ // Set ourselves up to be called from the application loop
+ connect(&mInitTimer, SIGNAL(timeout()), this, SLOT(doInit()));
+ mInitTimer.start(0, true);
+
+ // Required so that the saved config is correctly loaded
+ // (see TrayLabelMgr::doRestoreSession() for usage)
+ if (TDEApplication::kApplication()->isRestored())
+ {
+ TDEApplication::kApplication()->sessionConfig();
+ }
+}
+
+void TDEDocker::doInit()
{
INIT_TRACE();
/*
@@ -58,12 +71,6 @@ TDEDocker::TDEDocker()
if (prev_instance == None)
{
- if (TDEApplication::kApplication()->isRestored())
- {
- // Required so that the saved config is correctly loaded
- // (see TrayLabelMgr::doRestoreSession() for usage)
- TDEApplication::kApplication()->sessionConfig();
- }
mSelectionOwner = XCreateSimpleWindow(display, tqt_xrootwin(), 1, 1, 1, 1, 1, 1, 1);
XSetSelectionOwner(display, tdedocker, mSelectionOwner, CurrentTime);
TRACE("Selection owner set to 0x%x", (unsigned) mSelectionOwner);
@@ -118,7 +125,7 @@ void TDEDocker::notifyPreviousInstance(Window prevInstance)
XSendEvent(display, prevInstance, False, 0, (XEvent *) &dock_event);
XSync(display, False);
- ::exit(0);
+ quit();
}
/*