diff options
author | fvogel <fvogelnew1@free.fr> | 2017-10-17 20:06:39 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-10-17 20:06:39 (GMT) |
commit | 243fc9b651d187f1455e75470374f27a44ad7423 (patch) | |
tree | caf239f9ecfe6ca4567b98cd921af4beba5f3660 /macosx/tkMacOSXDraw.c | |
parent | 39c811429bffb82e9656e6f1318519735e199a1f (diff) | |
download | tk-243fc9b651d187f1455e75470374f27a44ad7423.zip tk-243fc9b651d187f1455e75470374f27a44ad7423.tar.gz tk-243fc9b651d187f1455e75470374f27a44ad7423.tar.bz2 |
New patch from Marc Culler aiming at fixing [fab5fed65e] without breaking again [92e614e612] nor [40a9abb9db].
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 5252ce9..65c9610 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1508,7 +1508,8 @@ TkScrollWindow( Drawable drawable = Tk_WindowId(tkwin); MacDrawable *macDraw = (MacDrawable *) drawable; TKContentView *view = (TKContentView *)TkMacOSXDrawableView(macDraw); - CGRect srcRect, dstRect; + TkWindow *winPtr = (TkWindow *)tkwin, *childPtr; + CGRect srcRect, dstRect, childBounds; HIShapeRef dmgRgn = NULL, extraRgn = NULL; NSRect bounds, visRect, scrollSrc, scrollDst; int result = 0; @@ -1541,9 +1542,8 @@ TkScrollWindow( ChkErr(HIShapeDifference, dmgRgn, extraRgn, (HIMutableShapeRef) dmgRgn); result = HIShapeIsEmpty(dmgRgn) ? 0 : 1; - /* Convert to Tk coordinates. */ + /* Convert to Tk coordinates, offset by the window origin. */ TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn); - TkMacOSXOffsetRegion(damageRgn, -macDraw->xOff, -macDraw->yOff); if (extraRgn) { CFRelease(extraRgn); } @@ -1552,9 +1552,6 @@ TkScrollWindow( [view scrollRect:scrollSrc by:NSMakeSize(dx, -dy)]; /* Shift the Tk children which meet the source rectangle. */ - TkWindow *winPtr = (TkWindow *)tkwin; - TkWindow *childPtr; - CGRect childBounds; for (childPtr = winPtr->childList; childPtr != NULL; childPtr = childPtr->nextPtr) { if (Tk_IsMapped(childPtr) && !Tk_IsTopLevel(childPtr)) { TkMacOSXWinCGBounds(childPtr, &childBounds); @@ -1571,11 +1568,6 @@ TkScrollWindow( } } TkMacOSXInvalidateWindow(macDraw, TK_WINDOW_ONLY); - - /* Queue up Expose events for the damage region. */ - int oldMode = Tcl_SetServiceMode(TCL_SERVICE_NONE); - [view generateExposeEvents:dmgRgn childrenOnly:1]; - Tcl_SetServiceMode(oldMode); } } else { dmgRgn = HIShapeCreateEmpty(); |