summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-12-05 13:31:00 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-12-05 13:31:00 (GMT)
commit20e5273f5b6208576bf9bc900e4cff39d724cb7f (patch)
treec517eeff7e3f14a0dab16660a725339c243fdead /generic/tkTextDisp.c
parent7f2c3a3f39d6a76f0656cbffc7e589b1a59bc346 (diff)
downloadtk-20e5273f5b6208576bf9bc900e4cff39d724cb7f.zip
tk-20e5273f5b6208576bf9bc900e4cff39d724cb7f.tar.gz
tk-20e5273f5b6208576bf9bc900e4cff39d724cb7f.tar.bz2
Fix for bug [ff8a1e55a2] - Filling a never-mapped text widget is CPU hungry - Patch from Koen Danckaert
Diffstat (limited to 'generic/tkTextDisp.c')
-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;