summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-02-19 02:27:03 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-02-19 02:27:03 (GMT)
commit677891bbd4da362beec2afb9f93af915600182dd (patch)
tree870dad095fffba59e3e26a3858c2e74e1d95a0a7 /macosx/tkMacOSXDraw.c
parent5ed292ea4607b62a48f55c5a6be3ffa103971664 (diff)
downloadtk-677891bbd4da362beec2afb9f93af915600182dd.zip
tk-677891bbd4da362beec2afb9f93af915600182dd.tar.gz
tk-677891bbd4da362beec2afb9f93af915600182dd.tar.bz2
Restore live resize to Cocoa with reduced flickering; addresses most serious issue of Cocoa drawing while preserving user expectations for display during window resize; thanks to Marc Culler for extensive patch
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 2f65517..fa99b14 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1510,14 +1510,6 @@ TkScrollWindow(
/* Scroll the rectangle. */
[view scrollRect:scrollSrc by:NSMakeSize(dx, -dy)];
-
- /* Redisplay the scrolled area; hide to reduce flicker after removal of private API calls. */
- [view setHidden:YES];
- [view displayRect:scrollDst];
- [view setHidden:NO];
-
-
-
}
}
@@ -1862,9 +1854,9 @@ TkpClipDrawableToRect(
macDraw->drawRgn = NULL;
}
if (width >= 0 && height >= 0) {
- CGRect drawRect = CGRectMake(x + macDraw->xOff, y + macDraw->yOff,
+ CGRect clipRect = CGRectMake(x + macDraw->xOff, y + macDraw->yOff,
width, height);
- HIShapeRef drawRgn = HIShapeCreateWithRect(&drawRect);
+ HIShapeRef drawRgn = HIShapeCreateWithRect(&clipRect);
if (macDraw->winPtr && macDraw->flags & TK_CLIP_INVALID) {
TkMacOSXUpdateClipRgn(macDraw->winPtr);
@@ -1877,9 +1869,9 @@ TkpClipDrawableToRect(
macDraw->drawRgn = drawRgn;
}
if (view && view != [NSView focusView] && [view lockFocusIfCanDraw]) {
- drawRect.origin.y = [view bounds].size.height -
- (drawRect.origin.y + drawRect.size.height);
- NSRectClip(NSRectFromCGRect(drawRect));
+ clipRect.origin.y = [view bounds].size.height -
+ (clipRect.origin.y + clipRect.size.height);
+ NSRectClip(NSRectFromCGRect(clipRect));
macDraw->flags |= TK_FOCUSED_VIEW;
}
} else {