diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-04 18:12:45 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-04 18:12:45 -0600 |
commit | 4546adf40c34f1ad89a8924e81cf94a5af768093 (patch) | |
tree | 897ed37b8aa2d15d68a14b80c590d22f439675fa /ksmserver | |
parent | b5d92fb45b0796f0140c2917c238fd0b6a192300 (diff) | |
download | tdebase-4546adf40c34f1ad89a8924e81cf94a5af768093.tar.gz tdebase-4546adf40c34f1ad89a8924e81cf94a5af768093.zip |
Initial attempt at adding third part WM support to TDE
Diffstat (limited to 'ksmserver')
-rw-r--r-- | ksmserver/main.cpp | 4 | ||||
-rw-r--r-- | ksmserver/server.cpp | 3 | ||||
-rw-r--r-- | ksmserver/server.h | 3 | ||||
-rw-r--r-- | ksmserver/startup.cpp | 10 |
4 files changed, 16 insertions, 4 deletions
diff --git a/ksmserver/main.cpp b/ksmserver/main.cpp index a7f8ef3d9..c971c2dde 100644 --- a/ksmserver/main.cpp +++ b/ksmserver/main.cpp @@ -35,6 +35,7 @@ static const KCmdLineOptions options[] = { "restore", I18N_NOOP("Restores the saved user session if available"), 0}, { "w", 0, 0 }, { "windowmanager <wm>", I18N_NOOP("Starts 'wm' in case no other window manager is \nparticipating in the session. Default is 'twin'"), 0}, + { "windowmanageraddargs <wm>", I18N_NOOP("Pass additional arguments to the window manager. Default is ''"), 0}, { "nolocal", I18N_NOOP("Also allow remote connections"), 0}, KCmdLineLastOption }; @@ -203,6 +204,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] ) } TQCString wm = args->getOption("windowmanager"); + TQCString wmaddargs = args->getOption("windowmanageraddargs"); if ( wm.isEmpty() ) wm = "twin"; @@ -218,7 +220,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] ) only_local = false; #endif - KSMServer *server = new KSMServer( TQString::fromLatin1(wm), only_local); + KSMServer *server = new KSMServer( TQString::fromLatin1(wm), TQString::fromLatin1(wmaddargs), only_local); kapp->dcopClient()->setDefaultObject( server->objId() ); IceSetIOErrorHandler( IoErrorHandler ); diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index 91cfb7544..f47f10ab2 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -578,12 +578,13 @@ static Status KSMNewClientProc ( SmsConn conn, SmPointer manager_data, extern "C" int _IceTransNoListen(const char * protocol); #endif -KSMServer::KSMServer( const TQString& windowManager, bool _only_local ) +KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManagerAddArgs, bool _only_local ) : DCOPObject("ksmserver"), sessionGroup( "" ), startupNotifierIPDlg(0), shutdownNotifierIPDlg(0) { the_server = this; clean = false; wm = windowManager; + wmAddArgs = windowManagerAddArgs; shutdownType = KApplication::ShutdownTypeNone; diff --git a/ksmserver/server.h b/ksmserver/server.h index 9464d5275..ca73c3a86 100644 --- a/ksmserver/server.h +++ b/ksmserver/server.h @@ -58,7 +58,7 @@ k_dcop: void kcmPhase1Done(); void kcmPhase2Done(); public: - KSMServer( const TQString& windowManager, bool only_local ); + KSMServer( const TQString& windowManager, const TQString& windowManagerAddArgs, bool only_local ); ~KSMServer(); static KSMServer* self(); @@ -203,6 +203,7 @@ private: bool clean; KSMClient* clientInteracting; TQString wm; + TQString wmAddArgs; TQString sessionGroup; TQString sessionName; TQCString launcher; diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp index b53ae3d18..eaee5f20c 100644 --- a/ksmserver/startup.cpp +++ b/ksmserver/startup.cpp @@ -180,7 +180,15 @@ void KSMServer::startDefaultSession() "autoStart1Done()", true); connectDCOPSignal( launcher, launcher, "autoStart2Done()", "autoStart2Done()", true); - startApplication( wm ); + if (!wmAddArgs.isEmpty()) { + TQStringList wmstartupcommand; + wmstartupcommand.split(" ", wmAddArgs); + wmstartupcommand.prepend(wm); + startApplication( wmstartupcommand ); + } + else { + startApplication( wm ); + } if ((showFancyLogin) && (!startupNotifierIPDlg)) { startupNotifierIPDlg = KSMStartupIPDlg::showStartupIP(); } |