diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-09-08 12:44:55 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-09-08 12:44:55 +0200 |
| commit | b69286f2ca93bdda135cff6189e22d01583c7624 (patch) | |
| tree | f1230d50e9c52e082f829a9ff53b32554efecda8 /src | |
| parent | 27e02a1541db180e3d4260732461a080dab593a1 (diff) | |
Remove deprecation warning of graphicsContextWithWindow used with macOS ≤ 10.13
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 4 |
1 files changed, 4 insertions, 0 deletions
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]; } |
