From e1fe0a2bb0f5fc078f719198276757e4319e0e43 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Wed, 27 Sep 2023 15:45:05 +1000 Subject: Deprecated methods disableFlushWindow and enableFlushWindow are avoided on macOS 10.14+. Test application contains example calls that exercize this when available. --- cocoa/ScintillaView.mm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'cocoa/ScintillaView.mm') diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 54988f650..cee96def5 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -1349,10 +1349,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { * (like clearing all marks and setting new ones etc.). */ - (void) suspendDrawing: (BOOL) suspend { - if (suspend) - [self.window disableFlushWindow]; - else - [self.window enableFlushWindow]; + if (@available(macOS 10.14, *)) { + // Don't try where deprecated + } else { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + if (suspend) + [self.window disableFlushWindow]; + else + [self.window enableFlushWindow]; +#pragma GCC diagnostic pop + } } //-------------------------------------------------------------------------------------------------- -- cgit v1.2.3