summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-01-15 22:29:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-01-15 22:29:53 (GMT)
commit886747e926ca6149ad730cbd07c59aa716f46435 (patch)
tree04b672d27370b414aa12a4dbb6035e1b5d78bd9f
parent32a7d700a16f886e7d863c0189979b4c89837001 (diff)
downloadtk-886747e926ca6149ad730cbd07c59aa716f46435.zip
tk-886747e926ca6149ad730cbd07c59aa716f46435.tar.gz
tk-886747e926ca6149ad730cbd07c59aa716f46435.tar.bz2
Remove obsolete comments. The line they comment was kicked out of the code in [946e946700]. bug_fab5fed65e
Also, add a small optimization to avoid double invalidation of the damaged region. Indeed the detailed analysis of ticket [fab5fed65e] showed that on OS X the damaged region is invalidated twice: - once through the processing of the Expose event (on OS X the Appkit is not used to draw the widget, Tk is used instead, see comments in tkMacOSXWindowEvent.c around line 770) - a second time because DisplayText() calls TextInvalidateRegion() after TkScrollWindow()
-rw-r--r--generic/tkTextDisp.c3
-rw-r--r--macosx/tkMacOSXDraw.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 1be26c4..c271b4b 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -4299,8 +4299,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 09a6b4e..5ca8bfe 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1565,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();