Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-01-06
16:28 • Closed ticket [d84d334ae6]: Fix build on older macOS System plus 7 other cha... artifact: f701fd885b user: jan.nijtmans
2023-01-05
21:39 • New ticket [d84d334ae6]. artifact: e03aecaff1 user: anonymous

Fix build on older macOS System

Closed / Fixedd84d334ae6f7e4fb83934d245d01367805adb8acCreated 4 years agoUpdated 4 years ago
Descriptionplain2023-01-05 21:39:35
Tk makes use of viewDidChangeBackingProperties, which is only available on macOS 10.7+.
Wrapping viewDidChangeBackingProperties with preprocessor commands fixes the problem.

See https://github.com/tcltk/tk/commit/b0cb1a48cb0c4a0118d45e8804476a6b4ab502c8
See also https://developer.apple.com/documentation/quartzcore/calayer/1410746-contentsscale



--- macosx/tkMacOSXWindowEvent.c.orig
+++ macosx/tkMacOSXWindowEvent.c
@@ -1009,6 +1009,7 @@
     return NO;
 }
 
+#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
 - (void) viewDidChangeBackingProperties
 {
 
@@ -1021,6 +1022,7 @@
 
     self.layer.contentsScale = self.window.screen.backingScaleFactor;
 }
+#endif
 
 - (void) addTkDirtyRect: (NSRect) rect
 {
jan.nijtmanswiki2023-01-06 16:28:06

Fixed here

Log in (anonymous is fine) to add a comment.