Commit 6b811ec2 authored by Jekyll Wu's avatar Jekyll Wu

Konsole should use new process when some Qt/KDE options are given

One typical option is "--display", because two konsole windows
belonging to the same process are destined to be shown in the same
display, which defeats the purpose of the "--display" option

CCBUG: 297224

BUG: 179010
BUG: 297801
FIXED-IN: 4.9.0
REVIEW: 104653
parent cce19d8c
......@@ -86,6 +86,34 @@ extern "C" int KDE_EXPORT kdemain(int argc, char** argv)
}
bool shouldUseNewProcess()
{
// The "unique process" model of konsole is incompatible with some or all
// Qt/KDE options. When those incompatile options are given, konsole must
// new new process
//
// TODO: make sure the existing list is OK and add more incompatible options.
// take Qt options into consideration
const KCmdLineArgs* qtArgs = KCmdLineArgs::parsedArgs("qt");
QStringList qtProblematicOptions;
qtProblematicOptions << "display" << "session" << "name"
<< "visual" << "reverse" << "stylesheet"
<< "graphicssystem";
foreach(const QString& option, qtProblematicOptions) {
if ( qtArgs->isSet(option.toLocal8Bit()) ) {
return true;
}
}
// take KDE options into consideration
const KCmdLineArgs* kdeArgs = KCmdLineArgs::parsedArgs("kde");
QStringList kdeProblematicOptions;
kdeProblematicOptions << "config" << "style" << "waitforwm";
foreach(const QString& option, kdeProblematicOptions) {
if ( kdeArgs->isSet(option.toLocal8Bit()) ) {
return true;
}
}
const KCmdLineArgs* kUniqueAppArgs = KCmdLineArgs::parsedArgs("kuniqueapp");
// when user asks konsole to run in foreground through the --nofork option
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment