Added x-attach-split-to-window command line arg (#2411)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
fourtf
2021-04-17 16:15:23 +02:00
committed by GitHub
parent 58017a7546
commit 2db140d5af
21 changed files with 350 additions and 160 deletions
+13
View File
@@ -26,6 +26,9 @@ Args::Args(const QApplication &app)
// Added to ignore the parent-window option passed during native messaging
QCommandLineOption parentWindowOption("parent-window");
parentWindowOption.setFlags(QCommandLineOption::HiddenFromHelp);
QCommandLineOption parentWindowIdOption("x-attach-split-to-window", "",
"window-id");
parentWindowIdOption.setFlags(QCommandLineOption::HiddenFromHelp);
// Verbose
QCommandLineOption verboseOption({{"v", "verbose"},
@@ -37,6 +40,7 @@ Args::Args(const QApplication &app)
{{"V", "version"}, "Displays version information."},
crashRecoveryOption,
parentWindowOption,
parentWindowIdOption,
verboseOption,
});
parser.addOption(QCommandLineOption(
@@ -73,6 +77,15 @@ Args::Args(const QApplication &app)
this->printVersion = parser.isSet("V");
this->crashRecovery = parser.isSet("crash-recovery");
if (parser.isSet(parentWindowIdOption))
{
this->isFramelessEmbed = true;
this->dontSaveSettings = true;
this->dontLoadMainWindow = true;
this->parentWindowId = parser.value(parentWindowIdOption).toULongLong();
}
}
void Args::applyCustomChannelLayout(const QString &argValue)