mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fixes #840
This commit is contained in:
parent
9523484bfe
commit
886ee3ff10
15
src/main.cpp
15
src/main.cpp
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user