From d312284099ea1ddae761359c00e76813812662d2 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 10 Nov 2018 09:00:45 +0000 Subject: Account for property graphicsPort of NSGraphicsContext being deprecated in 10.14 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3