Start new WM on application

pull/2/head
Timothy Pearson 12 years ago
parent 0a95f04863
commit 7e955780a5

@ -54,6 +54,7 @@
#include <kdialog.h>
#include <kgenericfactory.h>
#include <kaboutdata.h>
#include <kprocess.h>
#include <dcopclient.h>
#include "twindecoration.h"
@ -333,7 +334,7 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c
windowmanagerLayout->addWidget(thirdpartyWMLabel);
windowmanagerLayout->addWidget(thirdpartyWMList);
thirdpartyWMArguments = new KLineEdit( windowmanagerPage );
whatsThis = i18n("Specify any command line arguments to be passed to the selected WM on startup. A common example is --replace");
whatsThis = i18n("Specify any command line arguments to be passed to the selected WM on startup, separated with whitespace. A common example is replace");
TQWhatsThis::add(thirdpartyWMArguments, whatsThis);
TQLabel* thirdpartyWMArgumentsLabel = new TQLabel(i18n("Command line arguments to pass to the Window Manager (should remain blank unless needed):"), windowmanagerPage);
windowmanagerLayout->addWidget(thirdpartyWMArgumentsLabel);
@ -817,6 +818,15 @@ void KWinDecorationModule::writeConfig( KConfig* conf )
if (descStart >= 0) {
wmExecutableName.truncate(descStart);
}
if (conf->readEntry("WMExecutable", "twin") != wmExecutableName) {
KProcess newWMProc;
TQStringList wmstartupcommand;
wmstartupcommand.split(" ", thirdpartyWMArguments->text());
wmstartupcommand.prepend(wmExecutableName);
newWMProc << wmstartupcommand;
newWMProc.start(KProcess::DontCare, NoCommunication);
newWMProc.detach();
}
conf->writeEntry("WMExecutable", wmExecutableName);
conf->writeEntry("WMAdditionalArguments", thirdpartyWMArguments->text());

Loading…
Cancel
Save