mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-09 06:07:06 +01:00
Bug2437: Call finishLaunching() before sleeping
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user