diff options
author | dgp <dgp@users.sourceforge.net> | 2015-11-30 21:21:48 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-11-30 21:21:48 (GMT) |
commit | a24fdcc2b9295b493a9cd9e7632be98c5ddb3f6a (patch) | |
tree | 24ccb2318d04412685b1a4262df7c33df0864d34 /macosx/tkMacOSXWindowEvent.c | |
parent | ddb9e825e0b85f216d172f8b537257c8d58b0de9 (diff) | |
parent | b8bfd3505b511a3cc94297df7f04c55505d6df2c (diff) | |
download | tk-a24fdcc2b9295b493a9cd9e7632be98c5ddb3f6a.zip tk-a24fdcc2b9295b493a9cd9e7632be98c5ddb3f6a.tar.gz tk-a24fdcc2b9295b493a9cd9e7632be98c5ddb3f6a.tar.bz2 |
merge 8.5
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index ef3c86b..0b32e7e 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -747,15 +747,16 @@ TkWmProtocolEventProc( int Tk_MacOSXIsAppInFront(void) { - OSStatus err; - ProcessSerialNumber frontPsn, ourPsn = {0, kCurrentProcess}; Boolean isFrontProcess = true; +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 + ProcessSerialNumber frontPsn, ourPsn = {0, kCurrentProcess}; - err = ChkErr(GetFrontProcess, &frontPsn); - if (err == noErr) { - ChkErr(SameProcess, &frontPsn, &ourPsn, &isFrontProcess); + if (noErr == GetFrontProcess(&frontPsn)){ + SameProcess(&frontPsn, &ourPsn, &isFrontProcess); } - +#else + isFrontProcess = [NSRunningApplication currentApplication].active; +#endif return (isFrontProcess == true); } @@ -782,21 +783,6 @@ Tk_MacOSXIsAppInFront(void) * */ -@interface TKContentView(TKWindowEvent) -- (void) drawRect: (NSRect) rect; -- (void) generateExposeEvents: (HIShapeRef) shape; -- (void) generateExposeEvents: (HIShapeRef) shape childrenOnly: (int) childrenOnly; -- (void) viewDidEndLiveResize; -- (void) tkToolbarButton: (id) sender; -- (BOOL) isOpaque; -- (BOOL) wantsDefaultClipping; -- (BOOL) acceptsFirstResponder; -- (void) keyDown: (NSEvent *) theEvent; -@end - -@implementation TKContentView -@end - /*Restrict event processing to Expose events.*/ static Tk_RestrictAction ExposeRestrictProc( |