Allow derived classes to prevent default focus handling (by not
calling Skip) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b0d0494ff5
commit
dc76287dcd
@ -3328,6 +3328,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
|
||||
@ -3338,19 +3346,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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user