X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/2a537311063d3e49479ff4cc8b94287a10c37266..3685f89cbd6c524c91b41bd41bd3db038b3f1b43:/client/util_darwin.m diff --git a/client/util_darwin.m b/client/util_darwin.m index d07ebebc..c0f69aa9 100644 --- a/client/util_darwin.m +++ b/client/util_darwin.m @@ -12,6 +12,7 @@ #import #import +#import static id activity = nil; @@ -38,3 +39,17 @@ void enableAppNap() { void disableAppNap(const char* reason) { } void enableAppNap() { } #endif + +//OS X Version 10.6 is defined in OS X 10.6 and later +#if defined(MAC_OS_X_VERSION_10_6) +void makeUnfocusable() { + [NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited]; +} + +void makeFocusable() { + [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; +} +#else +void makeUnfocusable() { } +void makeFocusable() { } +#endif