aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <nyamatongwe@gmail.com>2014-03-27 18:24:47 +1100
committernyamatongwe <nyamatongwe@gmail.com>2014-03-27 18:24:47 +1100
commitb98cccfe8bbd8a0596e88ce895bd7daa90fb3d69 (patch)
treeba35015944374b64fde1c37ee17dd4c70e36ff6f
parentc7062988fae7ef98dc94b4b4956d01cbd4c6226c (diff)
downloadscintilla-mirror-b98cccfe8bbd8a0596e88ce895bd7daa90fb3d69.tar.gz
Surround 10.9-specific calls with version checks to ensure builds on old SDKs.
-rw-r--r--cocoa/ScintillaCocoa.mm4
-rw-r--r--cocoa/ScintillaView.mm2
2 files changed, 6 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index c5f24fcd6..cf517db2d 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -717,6 +717,7 @@ PRectangle ScintillaCocoa::GetClientRectangle()
* Allow for prepared rectangle
*/
PRectangle ScintillaCocoa::GetClientDrawingRectangle() {
+#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080
SCIContentView *content = ContentView();
if ([content respondsToSelector: @selector(setPreparedContentRect:)]) {
NSRect rcPrepared = [content preparedContentRect];
@@ -724,6 +725,7 @@ PRectangle ScintillaCocoa::GetClientDrawingRectangle() {
return PRectangle(rcPrepared.origin.x, rcPrepared.origin.y,
rcPrepared.origin.x+rcPrepared.size.width, rcPrepared.origin.y + rcPrepared.size.height);
}
+#endif
return ScintillaCocoa::GetClientRectangle();
}
@@ -757,11 +759,13 @@ void ScintillaCocoa::RedrawRect(PRectangle rc)
void ScintillaCocoa::DiscardOverdraw()
{
+#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080
// If running on 10.9, reset prepared area to visible area
SCIContentView *content = ContentView();
if ([content respondsToSelector: @selector(setPreparedContentRect:)]) {
content.preparedContentRect = [content visibleRect];
}
+#endif
}
//--------------------------------------------------------------------------------------------------
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 222fcdc8f..bd79fbb71 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -253,7 +253,9 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
- (void) prepareContentInRect: (NSRect) rect
{
mOwner.backend->WillDraw(rect);
+#if MAC_OS_X_VERSION_MAX_ALLOWED > 1080
[super prepareContentInRect: rect];
+#endif
}
//--------------------------------------------------------------------------------------------------