diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-14 10:38:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-14 10:38:20 (GMT) |
commit | abbfede24d4b1e49dc602eddc74440120ce9b4e2 (patch) | |
tree | bfeba049ea3d99c5c5faf2afcbdce0f0087acf0f | |
parent | 8e10e228eb522d624088396eb6eab58e39663af8 (diff) | |
parent | 58588c714b254c02cfb6f20f808d935673b90cb1 (diff) | |
download | tk-abbfede24d4b1e49dc602eddc74440120ce9b4e2.zip tk-abbfede24d4b1e49dc602eddc74440120ce9b4e2.tar.gz tk-abbfede24d4b1e49dc602eddc74440120ce9b4e2.tar.bz2 |
Merge 8.6
-rw-r--r-- | macosx/tkMacOSXBitmap.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXFont.c | 7 | ||||
-rw-r--r-- | macosx/tkMacOSXPrivate.h | 1 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 2 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 2 | ||||
-rw-r--r-- | tests/pack.test | 2 | ||||
-rw-r--r-- | tests/place.test | 2 | ||||
-rw-r--r-- | win/makefile.vc | 2 | ||||
-rw-r--r-- | win/tkWinFont.c | 4 |
10 files changed, 12 insertions, 14 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c index 2e7230e..3c82663 100644 --- a/macosx/tkMacOSXBitmap.c +++ b/macosx/tkMacOSXBitmap.c @@ -178,7 +178,7 @@ TkpCreateNativeBitmap( NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFileType: iconUTI]; CGSize size = CGSizeMake(builtInIconSize, builtInIconSize); - Pixmap pixmap = PixmapFromImage(display, iconImage, NSSizeToCGSize(size)); + Pixmap pixmap = PixmapFromImage(display, iconImage, size); return pixmap; } diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 7685837..c9ca5c1 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1322,7 +1322,7 @@ TkMacOSXSetupDrawingContext( * will get redrawn in the next call to its drawRect method. */ - currentBounds = CGContextGetClipBoundingBox(dc.context); + currentBounds = NSRectFromCGRect(CGContextGetClipBoundingBox(dc.context)); if (!NSContainsRect(currentBounds, drawingBounds)) { [view addTkDirtyRect:drawingBounds]; } diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 50ef287..fc68aa9 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -127,7 +127,7 @@ static int CreateNamedSystemFont(Tcl_Interp *interp, self = [self init]; if (self) { _string = [[NSString alloc] initWithString:aString]; - self.UTF8String = _string.UTF8String; + _UTF8String = _string.UTF8String; } return self; } @@ -149,10 +149,6 @@ static int CreateNamedSystemFont(Tcl_Interp *interp, return [_string characterAtIndex:index]; } -# ifndef __clang__ -@synthesize DString = _ds; -#endif - - (Tcl_DString)DString { if ( _ds.string == NULL) { @@ -177,6 +173,7 @@ static int CreateNamedSystemFont(Tcl_Interp *interp, #ifndef __clang__ @synthesize UTF8String = _UTF8String; +@synthesize DString = _ds; #endif @end diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index 5b8ea14..31fc934 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -564,6 +564,7 @@ VISIBILITY_HIDDEN @private Tcl_DString _ds; NSString *_string; + const char *_UTF8String; } @property const char *UTF8String; @property (readonly) Tcl_DString DString; diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index d647b46..90827dd 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -6888,7 +6888,7 @@ ApplyWindowAttributeFlagChanges( * to the screen size. (For 10.11 and up, only) */ - if (@available(macOS 10.11, *)) { + if ([NSApp macOSVersion] >= 101100) { NSSize screenSize = [[macWindow screen] frame].size; [macWindow setMaxFullScreenContentSize:screenSize]; } diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index ea40a97..44c49fe 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1351,7 +1351,7 @@ static void ButtonElementMinSize( ThemeButtonParams *params = (ThemeButtonParams *)clientData; if (params->heightMetric != NoThemeMetric) { - ChkErr(GetThemeMetric, params->heightMetric, minHeight); + ChkErr(GetThemeMetric, params->heightMetric, (SInt *) minHeight); /* * The theme height does not include the 1-pixel border around diff --git a/tests/pack.test b/tests/pack.test index bdc6dd6..a17de62 100644 --- a/tests/pack.test +++ b/tests/pack.test @@ -1534,7 +1534,7 @@ test pack-17.2 {PackLostContentProc procedure} -setup { pack info .pack.a } -returnCodes error -result {window ".pack.a" isn't packed} -if {[tk windowingsystem] == "win32"} { +if {[tk windowingsystem] ne "aqua"} { proc packUpdate {} { update } diff --git a/tests/place.test b/tests/place.test index 25871df..b29abc0 100644 --- a/tests/place.test +++ b/tests/place.test @@ -261,7 +261,7 @@ test place-7.10 {ReconfigurePlacement procedure, computing size} -setup { list [winfo width .t.f2] [winfo height .t.f2] } -result {30 60} -if {[tk windowingsystem] == "win32"} { +if {[tk windowingsystem] ne "aqua"} { proc placeUpdate {} { update } diff --git a/win/makefile.vc b/win/makefile.vc index c672666..d09b3d6 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -22,7 +22,7 @@ # values for the OPTS macro in addition to the ones described there.
# noembed = Embeds Tcl scripts into the wish executable. Currently only
# applicable for static builds. Non-static builds currently
-# never embed.
+# never embed.
# noxp = If you do not have the uxtheme.h header then you
# cannot include support for XP themeing.
# square = Include the demo square widget.
diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 9f5a42b..6500c1c 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -1495,7 +1495,7 @@ MultiFontTextOut( familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, (int) (p - source), &runString); - familyPtr->textOutProc(hdc, x-((double)tm.tmOverhang/2), y, + familyPtr->textOutProc(hdc, x-(double)(tm.tmOverhang/2), y, (WCHAR *)Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); familyPtr->getTextExtentPoint32Proc(hdc, @@ -1517,7 +1517,7 @@ MultiFontTextOut( familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, (int) (p - source), &runString); - familyPtr->textOutProc(hdc, x-((double)tm.tmOverhang/2), y, + familyPtr->textOutProc(hdc, x-(double)(tm.tmOverhang/2), y, (WCHAR *)Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); Tcl_DStringFree(&runString); |