I think I finally fixed activation behaviour under MSW - now focus is not given
to random window after you switch to/from a frame git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -559,6 +559,15 @@ bool wxFrame::MSWCreate(int id, wxWindow *parent, const wxChar *wclass, wxWindow
|
||||
// subwindow found.
|
||||
void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
{
|
||||
if ( !event.GetActive() )
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
wxLogTrace(_T("focus"), _T("wxFrame %08x activated."), m_hWnd);
|
||||
|
||||
for ( wxWindowList::Node *node = GetChildren().GetFirst();
|
||||
node;
|
||||
node = node->GetNext() )
|
||||
@@ -579,7 +588,7 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
)
|
||||
{
|
||||
child->SetFocus();
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user