Attachment "textBlink.diff" to
ticket [1169429f]
added by
vincentdarley
2005-04-01 00:37:51.
? textBlink.diff
Index: tkText.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tkText.c,v
retrieving revision 1.56
diff -b -u -r1.56 tkText.c
--- tkText.c 14 Feb 2005 23:00:29 -0000 1.56
+++ tkText.c 31 Mar 2005 17:37:12 -0000
@@ -3380,6 +3380,15 @@
if ((textPtr->state == TK_TEXT_STATE_DISABLED) ||
!(textPtr->flags & GOT_FOCUS) || (textPtr->insertOffTime == 0)) {
+ if ((textPtr->insertOffTime == 0) && !(textPtr->flags & INSERT_ON)) {
+ /*
+ * The widget was configured to have zero offtime while
+ * the insertion point was not displayed. We have to
+ * display it once.
+ */
+ textPtr->flags |= INSERT_ON;
+ goto redrawInsert;
+ }
return;
}
if (textPtr->flags & INSERT_ON) {
@@ -3391,6 +3400,7 @@
textPtr->insertBlinkHandler = Tcl_CreateTimerHandler(
textPtr->insertOnTime, TextBlinkProc, (ClientData) textPtr);
}
+ redrawInsert:
TkTextMarkSegToIndex(textPtr, textPtr->insertMarkPtr, &index);
if (TkTextCharBbox(textPtr, &index, &x, &y, &w, &h, &charWidth) == 0) {
if (textPtr->insertCursorType) {