summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authorculler <culler>2020-08-23 13:21:39 (GMT)
committerculler <culler>2020-08-23 13:21:39 (GMT)
commit45fc71df26e06074f33babae916d97880a80e9cb (patch)
treee45302acd19b4ba33065888e3af5d406ad266516 /macosx/tkMacOSXWindowEvent.c
parentfaecc793509c834b9b7562b4d549d80585ead2d9 (diff)
downloadtk-45fc71df26e06074f33babae916d97880a80e9cb.zip
tk-45fc71df26e06074f33babae916d97880a80e9cb.tar.gz
tk-45fc71df26e06074f33babae916d97880a80e9cb.tar.bz2
Fix [bc62f78191]: compilation issues when targeting older macOS versions.
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index acea6f0..e75858d 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -207,9 +207,9 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
TkWindow *winPtr = TkMacOSXGetTkWindow(window);
if (winPtr) {
TKContentView *view = [window contentView];
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
- [view viewDidChangeEffectiveAppearance];
-#endif
+ if (@available(macOS 10.14, *)) {
+ [view viewDidChangeEffectiveAppearance];
+ }
[view addTkDirtyRect:[view bounds]];
Tcl_CancelIdleCall(TkMacOSXDrawAllViews, NULL);
Tcl_DoWhenIdle(TkMacOSXDrawAllViews, NULL);
@@ -1142,7 +1142,9 @@ static const char *const accentNames[] = {
{
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
if (object == preferences && [keyPath isEqualToString:@"AppleHighlightColor"]) {
- [self viewDidChangeEffectiveAppearance];
+ if (@available(macOS 10.14, *)) {
+ [self viewDidChangeEffectiveAppearance];
+ }
}
}