summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2015-12-05 13:31:00 (GMT)
committerfvogelnew1@free.fr <fvogel>2015-12-05 13:31:00 (GMT)
commitca54cc198dff20204e787141fe7af5f8413bc505 (patch)
treec517eeff7e3f14a0dab16660a725339c243fdead /generic
parent3c1c21477d88c78f1a53064d8be6ba9170467885 (diff)
downloadtk-ca54cc198dff20204e787141fe7af5f8413bc505.zip
tk-ca54cc198dff20204e787141fe7af5f8413bc505.tar.gz
tk-ca54cc198dff20204e787141fe7af5f8413bc505.tar.bz2
Fix for bug [ff8a1e55a2] - Filling a never-mapped text widget is CPU hungry - Patch from Koen Danckaert
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index cfe6e7a..0665ba7 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -2923,7 +2923,8 @@ AsyncUpdateLineMetrics(
return;
}
- if (dInfoPtr->flags & REDRAW_PENDING) {
+ if ((dInfoPtr->flags & REDRAW_PENDING) || !Tk_IsMapped(textPtr->tkwin)
+ || dInfoPtr->maxX <= dInfoPtr->x || dInfoPtr->maxY <= dInfoPtr->y) {
dInfoPtr->lineUpdateTimer = Tcl_CreateTimerHandler(1,
AsyncUpdateLineMetrics, clientData);
return;