From b69286f2ca93bdda135cff6189e22d01583c7624 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 8 Sep 2025 12:44:55 +0200 Subject: =?UTF-8?q?Remove=20deprecation=20warning=20of=20graphicsContextWi?= =?UTF-8?q?thWindow=20used=20with=20macOS=20=E2=89=A4=2010.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Fl_cocoa.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 13d536c6f..59b8829f5 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3689,8 +3689,12 @@ void Fl_Cocoa_Window_Driver::make_current() } else #endif { +// ignore deprecation warning of "graphicsContextWithWindow" because used only with 10.13 or before +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" NSGraphicsContext *nsgc = (through_drawRect ? [NSGraphicsContext currentContext] : [NSGraphicsContext graphicsContextWithWindow:fl_window]); +#pragma clang diagnostic pop static SEL gc_sel = fl_mac_os_version >= 101000 ? @selector(CGContext) : @selector(graphicsPort); gc = (CGContextRef)[nsgc performSelector:gc_sel]; } -- cgit v1.2.3