aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm4
1 files changed, 4 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
}
//--------------------------------------------------------------------------------------------------