1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
novist 2015-02-20 18:17:30 +02:00
parent 9523484bfe
commit 886ee3ff10

View File

@ -172,12 +172,17 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
}
else if (!ipc.isCurrentOwner() && !parser.isSet("p"))
else if (!ipc.isCurrentOwner())
{
time_t event = ipc.postEvent("activate");
ipc.waitUntilProcessed(event);
if (!ipc.isCurrentOwner())
return EXIT_SUCCESS;
uint32_t dest = 0;
if (parser.isSet("p"))
dest = Settings::getInstance().getCurrentProfileId();
time_t event = ipc.postEvent("activate", QByteArray(), dest);
if (ipc.waitUntilProcessed(event, 2) && ipc.isEventAccepted(event))
{
if (!ipc.isCurrentOwner())
return EXIT_SUCCESS;
}
}
#endif