Allow derived classes to prevent default focus handling (by not
calling Skip) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3577,6 +3577,14 @@ void wxListMainWindow::SetFocus()
|
||||
|
||||
void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
{
|
||||
if ( GetParent() )
|
||||
{
|
||||
wxFocusEvent event( wxEVT_SET_FOCUS, GetParent()->GetId() );
|
||||
event.SetEventObject( GetParent() );
|
||||
if ( GetParent()->GetEventHandler()->ProcessEvent( event) )
|
||||
return;
|
||||
}
|
||||
|
||||
// wxGTK sends us EVT_SET_FOCUS events even if we had never got
|
||||
// EVT_KILL_FOCUS before which means that we finish by redrawing the items
|
||||
// which are already drawn correctly resulting in horrible flicker - avoid
|
||||
@@ -3587,19 +3595,18 @@ void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
|
||||
RefreshSelected();
|
||||
}
|
||||
|
||||
if ( !GetParent() )
|
||||
return;
|
||||
|
||||
wxFocusEvent event( wxEVT_SET_FOCUS, GetParent()->GetId() );
|
||||
event.SetEventObject( GetParent() );
|
||||
GetParent()->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
void wxListMainWindow::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
{
|
||||
if ( GetParent() )
|
||||
{
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, GetParent()->GetId() );
|
||||
event.SetEventObject( GetParent() );
|
||||
if ( GetParent()->GetEventHandler()->ProcessEvent( event) )
|
||||
return;
|
||||
}
|
||||
m_hasFocus = FALSE;
|
||||
|
||||
RefreshSelected();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user