diff options
author | fvogel <fvogelnew1@free.fr> | 2017-01-18 22:23:10 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-01-18 22:23:10 (GMT) |
commit | b5a8363553e6127b6c684d33f6b3fdccb57f84df (patch) | |
tree | f5ca09b54bd2e197173054a95d20ac278041357c | |
parent | 5442c2a77a9c025b2245d42dbae20829f03be9bc (diff) | |
parent | 886747e926ca6149ad730cbd07c59aa716f46435 (diff) | |
download | tk-b5a8363553e6127b6c684d33f6b3fdccb57f84df.zip tk-b5a8363553e6127b6c684d33f6b3fdccb57f84df.tar.gz tk-b5a8363553e6127b6c684d33f6b3fdccb57f84df.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 704d47d..095bb5e 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; |