summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index c6dad6b31..ace5519f5 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3433,7 +3433,8 @@ void Fl_Cocoa_Window_Driver::make_current()
#endif
{
NSGraphicsContext *nsgc = through_Fl_X_flush ? [NSGraphicsContext currentContext] : [NSGraphicsContext graphicsContextWithWindow:fl_window];
- gc = (CGContextRef)[nsgc graphicsPort];
+ static SEL gc_sel = fl_mac_os_version >= 101000 ? @selector(CGContext) : @selector(graphicsPort);
+ gc = (CGContextRef)[nsgc performSelector:gc_sel];
}
Fl_Graphics_Driver::default_driver().gc(gc);
CGContextSaveGState(gc); // native context