Stop Scintilla timer when the control doesn't have focus.

This avoids excessive CPU load due to generating completely unnecessary timer
notifications for every wxSTC control in a program.

Closes #14938.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-06-05 00:26:27 +00:00
parent 1d160160b7
commit f81a758d4e

View File

@ -941,6 +941,7 @@ void ScintillaWX::DoLoseFocus(){
SetFocusState(false); SetFocusState(false);
focusEvent = false; focusEvent = false;
DestroySystemCaret(); DestroySystemCaret();
SetTicking(false);
} }
void ScintillaWX::DoGainFocus(){ void ScintillaWX::DoGainFocus(){
@ -949,6 +950,7 @@ void ScintillaWX::DoGainFocus(){
focusEvent = false; focusEvent = false;
DestroySystemCaret(); DestroySystemCaret();
CreateSystemCaret(); CreateSystemCaret();
SetTicking(true);
} }
void ScintillaWX::DoSysColourChange() { void ScintillaWX::DoSysColourChange() {