From b45b9ed9b12d8f05237f52b00a8d61cff1d53806 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 23 Aug 2015 20:09:06 +0900 Subject: Added DCOP method startupCompleted() to KSMServer: this allows to check whether the session has been fully created/restored. This relates to bug 1610. Signed-off-by: Michele Calgaro --- ksmserver/server.cpp | 6 ++++++ ksmserver/server.h | 4 +++- ksmserver/startup.cpp | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index f09dcd9df..505865c54 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -592,6 +592,7 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag state = Idle; dialogActive = false; saveSession = false; + m_startupCompleted = false; wmPhase1WaitingCount = 0; TDEConfig* config = TDEGlobal::config(); config->setGroup("General" ); @@ -990,3 +991,8 @@ bool KSMServer::defaultSession() const { return sessionGroup.isEmpty(); } + +bool KSMServer::startupCompleted() +{ + return m_startupCompleted; +} diff --git a/ksmserver/server.h b/ksmserver/server.h index bc677752c..a90ef43ac 100644 --- a/ksmserver/server.h +++ b/ksmserver/server.h @@ -61,6 +61,7 @@ k_dcop: void autoStart2Done(); void kcmPhase1Done(); void kcmPhase2Done(); + bool startupCompleted(); public: KSMServer( const TQString& windowManager, const TQString& windowManagerAddArgs, bool only_local ); ~KSMServer(); @@ -181,7 +182,7 @@ private: TQString windowWmClientMachine(WId w); WId windowWmClientLeader(WId w); TQCString windowSessionId(WId w, WId leader); - + bool checkStartupSuspend(); void finishStartup(); void resumeStartupInternal(); @@ -235,6 +236,7 @@ private: TQTimer startupSuspendTimeoutTimer; bool waitAutoStart2; bool waitKcmInit2; + bool m_startupCompleted; TQTimer pendingShutdown; TDEApplication::ShutdownConfirm pendingShutdown_confirm; TDEApplication::ShutdownType pendingShutdown_sdtype; diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp index b1ed9992e..fb9e696ec 100644 --- a/ksmserver/startup.cpp +++ b/ksmserver/startup.cpp @@ -389,6 +389,7 @@ void KSMServer::finishStartup() startupNotifierIPDlg=0; } + m_startupCompleted = true; setupXIOErrorHandler(); // From now on handle X errors as normal shutdown. } -- cgit v1.2.1