summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-01-04 23:16:41 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-01-04 23:16:41 (GMT)
commit94446123f6728f30f9bae4c73ad5d242e249ee0b (patch)
tree2a7b2de92b06637bf8e02859023549b3b8e86bfc /macosx/tkMacOSXDraw.c
parent29879491172358d63759c151d2c20e9d94784fc1 (diff)
downloadtk-94446123f6728f30f9bae4c73ad5d242e249ee0b.zip
tk-94446123f6728f30f9bae4c73ad5d242e249ee0b.tar.gz
tk-94446123f6728f30f9bae4c73ad5d242e249ee0b.tar.bz2
Improved scrolling for text under Cocoa; thanks to Marc Culler for patch.
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 9e3435d..07bfe81 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1488,6 +1488,7 @@ TkScrollWindow(
NSPoint delta = NSMakePoint(dx, dy);
int result;
+
if ( view ) {
/* Get the scroll area in NSView coordinates (origin at bottom left). */
bounds = [view bounds];
@@ -1533,8 +1534,12 @@ TkScrollWindow(
}
}
- /* Redisplay the scrolled area. */
- [view displayRect:scrollDst];
+ /* Redisplay the scrolled area; hide to reduce flicker after removal of private API calls. */
+ [view setHidden:YES];
+ [view displayRect:scrollDst];
+ [view setHidden:NO];
+
+
}
}