mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-26 16:28:11 +00:00
Set default CLI as "show" for secondary application to allow reopening background app from Windows Menu.
This commit is contained in:
parent
9a4653580c
commit
4f3e29ba57
1 changed files with 12 additions and 7 deletions
|
|
@ -703,22 +703,27 @@ void App::sendCommand() {
|
|||
auto arguments = mParser->positionalArguments();
|
||||
if (mParser->isSet("fetch-config")) arguments << "fetch-config=" + mParser->value("fetch-config");
|
||||
static bool firstStart = true; // We can't erase positional arguments. So we get them on each restart.
|
||||
if (firstStart && arguments.size() > 0) {
|
||||
if (firstStart) {
|
||||
firstStart = false;
|
||||
if (isSecondary()) { // Send to primary
|
||||
lDebug() << "Sending " << arguments;
|
||||
for (auto i : arguments) {
|
||||
sendMessage(i.toLocal8Bit(), -1);
|
||||
if (arguments.size() > 0) {
|
||||
lDebug() << log().arg("Sending") << arguments;
|
||||
for (auto i : arguments) {
|
||||
sendMessage(i.toLocal8Bit(), -1);
|
||||
}
|
||||
} else {
|
||||
lDebug() << log().arg("No arguments. Sending show command");
|
||||
sendMessage("show", -1);
|
||||
}
|
||||
} else { // Execute
|
||||
lDebug() << "Executing " << arguments;
|
||||
} else if (arguments.size() > 0) { // Execute
|
||||
lDebug() << log().arg("Executing ") << arguments;
|
||||
for (auto i : arguments) {
|
||||
QString command(i);
|
||||
receivedMessage(0, i.toLocal8Bit());
|
||||
}
|
||||
}
|
||||
} else if (isPrimary()) {
|
||||
lDebug() << "Run waiting process";
|
||||
lDebug() << log().arg("Run waiting process");
|
||||
receivedMessage(0, "");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue