audacia/src/AudacityApp.mm
Paul Licameli 64b066f655 Bug2437: possible further help...
... The 100ms sleep added at at a675b5907f was
meant to let NS framework events arrive on another thread and be detected by
wxWidgets.  But there are still reports that it is not reliable enough.

This other fix may be sufficient alone, making the sleep unnecessary.  But it
is harmless so we will leave it there.
2020-12-09 15:28:09 -05:00

29 lines
724 B
Plaintext

#ifdef __WXMAC__
#include "AudacityApp.h"
#include <AppKit/NSApplication.h>
// Mac-only methods of class AudacityApp that use Objective-C are kept
// here so that AudacityApp.cpp can be just C++
// The function is not presently used. See commit
// a05d039055909d7d1dc2d4f31e1fe0659a3207dd
// whih added this function, and later commit
// e359383d3bebd583b894c9ee9d02cce2be318b56
// which made it unused. Maybe it will need future use.
void AudacityApp::MacActivateApp()
{
id app = [NSApplication sharedApplication];
if ( [app respondsToSelector:@selector(activateIgnoringOtherApps:)] )
[app activateIgnoringOtherApps:YES];
}
void AudacityApp::MacFinishLaunching()
{
[NSApp finishLaunching];
}
#endif