From a0e08a4e0a361910be61adcb8d7a410e67a59476 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Thu, 1 Jan 2026 04:17:38 +0800 Subject: [PATCH] Fix build on 10.6 powerpc --- macosx/tkMacOSXPrivate.h | 16 ++++++++-------- macosx/tkMacOSXWindowEvent.c | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index fc5f13cc69..5cbb2e4a4c 100644 --- macosx/tkMacOSXPrivate.h +++ macosx/tkMacOSXPrivate.h @@ -317,8 +317,8 @@ VISIBILITY_HIDDEN NSAutoreleasePool *_mainPool; NSThread *_backgoundLoop; -#ifdef __i386__ - /* The Objective C runtime used on i386 requires this. */ +#if defined(__i386__) || defined(__POWERPC__) + /* The Objective C runtime used on i386 and PowerPC requires this. */ int _poolLock; int _macOSVersion; /* 10000 * major + 100*minor */ Bool _isDrawing; @@ -445,8 +445,8 @@ VISIBILITY_HIDDEN VISIBILITY_HIDDEN @interface TKWindow : NSWindow { -#ifdef __i386__ - /* The Objective C runtime used on i386 requires this. */ +#if defined(__i386__) || defined(__POWERPC__) + /* The Objective C runtime used on i386 and PowerPC requires this. */ Window _tkWindow; #endif } @@ -460,8 +460,8 @@ VISIBILITY_HIDDEN @interface TKDrawerWindow : NSWindow { id _i1, _i2; -#ifdef __i386__ - /* The Objective C runtime used on i386 requires this. */ +#if defined(__i386__) || defined(__POWERPC__) + /* The Objective C runtime used on i386 and PowerPC requires this. */ Window _tkWindow; #endif } @@ -470,8 +470,8 @@ VISIBILITY_HIDDEN @interface TKPanel : NSPanel { -#ifdef __i386__ - /* The Objective C runtime used on i386 requires this. */ +#if defined(__i386__) || defined(__POWERPC__) + /* The Objective C runtime used on i386 and PowerPC requires this. */ Window _tkWindow; #endif } diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 2c28cbcea6..31186ab8ed 100644 --- macosx/tkMacOSXWindowEvent.c +++ macosx/tkMacOSXWindowEvent.c @@ -992,10 +992,11 @@ ConfigureRestrictProc( self.layer = [CALayer layer]; self.wantsLayer = YES; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawOnSetNeedsDisplay; self.layer.contentsGravity = self.layer.contentsAreFlipped ? kCAGravityTopLeft : kCAGravityBottomLeft; - +#endif /* * Nothing gets drawn at all if the layer does not have a delegate. * Currently, we do not implement any methods of the delegate, however.