aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaView.mm
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2023-09-27 15:45:05 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2023-09-27 15:45:05 +1000
commite1fe0a2bb0f5fc078f719198276757e4319e0e43 (patch)
treea0e846192c47440a787bc1f512dbc27071ffd806 /cocoa/ScintillaView.mm
parent2ce3269bf0331da6b23cfcc7d954dc7bad33518d (diff)
downloadscintilla-mirror-e1fe0a2bb0f5fc078f719198276757e4319e0e43.tar.gz
Deprecated methods disableFlushWindow and enableFlushWindow are avoided on
macOS 10.14+. Test application contains example calls that exercize this when available.
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r--cocoa/ScintillaView.mm15
1 files changed, 11 insertions, 4 deletions
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
+ }
}
//--------------------------------------------------------------------------------------------------