From: Tomas Frydrych (email@example.com)
Date: Fri Aug 02 2002 - 09:34:05 EDT
We have got a problem in the mechanism that blinks the cursor. The
blinking is done via a timer and if we happen to be in another timer
context, the auto-update gets blocked until the timer-triggered code
finishes execution, and so the cursor does not blink.
A current example of this is the background spell checker. To avoid
the cursor disappearing while doing the background checking, on
entry into fl_BlockLayout::checkSpelling() we flick the cursor off and
then flick it on again just before we leave. This results in erratic
blinking since the interval of the blink is dictated by the time it takes
to spellcheck the current block, which is considerable for long
blocks and virtually null for short blocks (load a reasonably long
document, say 50 pages, and watch the behaviour of the cursor
immediately after the loading of the document finishes).
Now, I could improve the code in fl_BlockLayout::checkSpelling() so
that it does not flick the cursor more often than every 500 ms, but
that seems like treating the symptoms, not the problem. It would
seem to me that the proper solution would be to have the cursor-
blinking timer running in a separate thread, so that it does not get
blocked by other timer events in the main thead. This way we could
remove all the cursor-handling stuff from the spellchecking code,
and would not need to worry about the cursor if/when in the future
we implement other timer-driven stuff.
What do you think about the suggestion?
This archive was generated by hypermail 2.1.4 : Fri Aug 02 2002 - 09:43:28 EDT