Bugs item #1255804, was opened at 2005-08-10 13:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1255804&group_id=2439

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Scintilla
Group: Cosmetic
Status: Open
Resolution: None
Priority: 5
Submitted By: Blair McGlashan (blairmcg)
Assigned to: Nobody/Anonymous (nobody)
Summary: Caret/dwell timer continues to fire when focus lost

Initial Comment:
As soon as Scintilla first gains focus it starts a timer to 
implement cursor flashing, and also dwell notifications. 
This is a 100mS timer, but of course the cursor is 
invalidated less frequently. When Scintilla loses focus, 
the timer is not cancelled, and the timer continues to 
fire, invalidating the cursor even when it is not visible. 
There is a small, but unecessary, CPU load for this*, 
but perhaps more importantly it means that anyone 
using Remote Desktop Connection or Terminal 
Services, or similar, may be creating uncessary network 
traffic in needless redrawing.

*In fact when hosted in a container that subclasses the 
control, the cost of the timers firing might be 
significantly higher.

I think the fix is to modify Editor::DropCaret as follows:

void Editor::DropCaret() {
        caret.active = false;
-->     SetTicking(false);
        InvalidateCaret();
}

The indicated line being inserted. I'm not sure what 
effect this will have on the dwell stuff though, as I don't 
fully understand what it is doing. I did notice, however, 
that dwell events can be received when the view does 
not have focus as a result of the background timers, and 
this doesn't seem right to me.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102439&aid=1255804&group_id=2439
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to