mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
... The 100ms sleep added at at a675b5907f5fa7bba2537c249a84f73cabe5937c 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.
29 lines
724 B
Plaintext
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
|