move caret notification after sending the focus event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -648,13 +648,6 @@ void wxWindowMGL::SetFocus()
|
|||||||
|
|
||||||
MGL_wmCaptureEvents(GetHandle(), EVT_KEYEVT, wxMGL_CAPTURE_KEYB);
|
MGL_wmCaptureEvents(GetHandle(), EVT_KEYEVT, wxMGL_CAPTURE_KEYB);
|
||||||
|
|
||||||
#if wxUSE_CARET
|
|
||||||
// caret needs to be informed about focus change
|
|
||||||
wxCaret *caret = GetCaret();
|
|
||||||
if ( caret )
|
|
||||||
caret->OnSetFocus();
|
|
||||||
#endif // wxUSE_CARET
|
|
||||||
|
|
||||||
wxWindowMGL *active = wxGetTopLevelParent(this);
|
wxWindowMGL *active = wxGetTopLevelParent(this);
|
||||||
if ( !(m_windowStyle & wxPOPUP_WINDOW) && active != gs_activeFrame )
|
if ( !(m_windowStyle & wxPOPUP_WINDOW) && active != gs_activeFrame )
|
||||||
{
|
{
|
||||||
@@ -674,6 +667,13 @@ void wxWindowMGL::SetFocus()
|
|||||||
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
|
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
|
#if wxUSE_CARET
|
||||||
|
// caret needs to be informed about focus change
|
||||||
|
wxCaret *caret = GetCaret();
|
||||||
|
if ( caret )
|
||||||
|
caret->OnSetFocus();
|
||||||
|
#endif // wxUSE_CARET
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMGL::KillFocus()
|
void wxWindowMGL::KillFocus()
|
||||||
|
Reference in New Issue
Block a user