Fixes in focus handling related to the AutoComplete window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-09-23 23:42:41 +00:00
parent dcc8fac0c3
commit b0d0494ff5
6 changed files with 60 additions and 2 deletions

View File

@@ -136,6 +136,7 @@ END_EVENT_TABLE()
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
capturedMouse = false;
focusEvent = false;
wMain = win;
stc = win;
wheelRotation = 0;
@@ -333,6 +334,18 @@ void ScintillaWX::NotifyParent(SCNotification scn) {
}
// This method is overloaded from ScintillaBase in order to prevent the
// AutoComplete window from being destroyed when it gets the focus. There is
// a side effect that the AutoComp will also not be destroyed when switching
// to another window, but I think that is okay.
void ScintillaWX::CancelModes() {
if (! focusEvent)
AutoCompleteCancel();
ct.CallTipCancel();
Editor::CancelModes();
}
void ScintillaWX::Copy() {
if (currentPos != anchor) {
@@ -606,11 +619,15 @@ void ScintillaWX::DoSize(int WXUNUSED(width), int WXUNUSED(height)) {
}
void ScintillaWX::DoLoseFocus(){
focusEvent = true;
SetFocusState(false);
focusEvent = false;
}
void ScintillaWX::DoGainFocus(){
focusEvent = true;
SetFocusState(true);
focusEvent = false;
}
void ScintillaWX::DoSysColourChange() {