mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
Bug2437: Call finishLaunching() before sleeping
This commit is contained in:
parent
d8cd8041f1
commit
57134d93d6
@ -1278,13 +1278,15 @@ bool AudacityApp::OnInit()
|
||||
// opened. So use CallAfter() to delay the rest of initialization.
|
||||
// See CreateSingleInstanceChecker() where we send those paths over a
|
||||
// socket to the prior instance.
|
||||
|
||||
// This call is what probably makes the sleep unnecessary:
|
||||
MacFinishLaunching();
|
||||
|
||||
using namespace std::chrono;
|
||||
// This sleep may be unnecessary, but it is harmless. It less NS framework
|
||||
// events arrive on another thread, but it might not always be long enough.
|
||||
std::this_thread::sleep_for(100ms);
|
||||
CallAfter([this]{
|
||||
// This call is what probably makes the sleep unnecessary:
|
||||
MacFinishLaunching();
|
||||
if (!InitPart2())
|
||||
exit(-1);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user