diff options
author | fvogel <fvogelnew1@free.fr> | 2017-01-18 22:24:41 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-01-18 22:24:41 (GMT) |
commit | 0c33edcbe038707fa9ad175f159140800fc6c621 (patch) | |
tree | 741218bac624ce8d2188e9a8bc175473f5366125 | |
parent | 3b8b8111591d66d2fa3364971c7c17181ed872d5 (diff) | |
parent | b5a8363553e6127b6c684d33f6b3fdccb57f84df (diff) | |
download | tk-0c33edcbe038707fa9ad175f159140800fc6c621.zip tk-0c33edcbe038707fa9ad175f159140800fc6c621.tar.gz tk-0c33edcbe038707fa9ad175f159140800fc6c621.tar.bz2 |
Fix [fab5fed65e]: OS X - lots of textDisp failures (spurious 'borders' and indices in tk_textRedraw).
-rw-r--r-- | generic/tkTextDisp.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 9 | ||||
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 4 |
3 files changed, 4 insertions, 12 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index a5f8752..a022970 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -4298,8 +4298,9 @@ DisplayText( if (TkScrollWindow(textPtr->tkwin, dInfoPtr->scrollGC, dInfoPtr->x, oldY, dInfoPtr->maxX-dInfoPtr->x, height, 0, y-oldY, damageRgn)) { +#ifndef MAC_OSX_TK TextInvalidateRegion(textPtr, damageRgn); - +#endif } numCopies++; TkDestroyRegion(damageRgn); diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 474ed41..5ca8bfe 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1527,12 +1527,6 @@ TkScrollWindow( srcRect = CGRectMake(x, y, width, height); dstRect = CGRectOffset(srcRect, dx, dy); - /* Expand the rectangles slightly to avoid degeneracies. */ - srcRect.origin.y -= 1; - srcRect.size.height += 2; - dstRect.origin.y += 1; - dstRect.size.height -= 2; - /* Compute the damage. */ dmgRgn = HIShapeCreateMutableWithRect(&srcRect); extraRgn = HIShapeCreateWithRect(&dstRect); @@ -1571,9 +1565,6 @@ TkScrollWindow( int oldMode = Tcl_SetServiceMode(TCL_SERVICE_NONE); [view generateExposeEvents:dmgRgn childrenOnly:1]; Tcl_SetServiceMode(oldMode); - - /* Belt and suspenders: make the AppKit request a redraw - when it gets control again. */ } } else { dmgRgn = HIShapeCreateEmpty(); diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index a669a8a..4672586 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -357,8 +357,8 @@ GenerateUpdates( event.xany.window = Tk_WindowId(winPtr); event.xany.display = Tk_Display(winPtr); event.type = Expose; - event.xexpose.x = damageBounds.origin.x - bounds.origin.x; - event.xexpose.y = damageBounds.origin.y - bounds.origin.y; + event.xexpose.x = damageBounds.origin.x; + event.xexpose.y = damageBounds.origin.y; event.xexpose.width = damageBounds.size.width; event.xexpose.height = damageBounds.size.height; event.xexpose.count = 0; |