1. added wxEvtHandler::SafelyProcessEvent() and wxWindow::HandleWindowEvent() to correctly handle exceptions in even handlers in wxGTK
2. use HandleWindowEvent() everywhere as more obvious and convenient shortcut for GetEventHandler()->ProcessEvent(); also for consistency with wxGTK where it's required git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -372,7 +372,7 @@ static void wxCloseTLWCallback( Widget WXUNUSED(widget), XtPointer client_data,
|
||||
closeEvent.SetEventObject( tlw );
|
||||
|
||||
// May delete the dialog (with delayed deletion)
|
||||
tlw->GetEventHandler()->ProcessEvent(closeEvent);
|
||||
tlw->HandleWindowEvent(closeEvent);
|
||||
}
|
||||
|
||||
void wxTLWEventHandler( Widget wid,
|
||||
@@ -391,7 +391,7 @@ void wxTLWEventHandler( Widget wid,
|
||||
{
|
||||
wxevent.SetEventObject( tlw );
|
||||
wxevent.SetId( tlw->GetId() );
|
||||
tlw->GetEventHandler()->ProcessEvent( wxevent );
|
||||
tlw->HandleWindowEvent( wxevent );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -405,7 +405,7 @@ void wxTLWEventHandler( Widget wid,
|
||||
keyEvent.SetEventObject( tlw );
|
||||
keyEvent.SetId( tlw->GetId() );
|
||||
keyEvent.SetEventType( wxEVT_CHAR_HOOK );
|
||||
if( tlw->GetEventHandler()->ProcessEvent( keyEvent ) )
|
||||
if( tlw->HandleWindowEvent( keyEvent ) )
|
||||
{
|
||||
*continueToDispatch = False;
|
||||
return;
|
||||
@@ -417,10 +417,10 @@ void wxTLWEventHandler( Widget wid,
|
||||
keyEvent.SetEventType( wxEVT_KEY_DOWN );
|
||||
|
||||
// Only process OnChar if OnKeyDown didn't swallow it
|
||||
if( !tlw->GetEventHandler()->ProcessEvent( keyEvent ) )
|
||||
if( !tlw->HandleWindowEvent( keyEvent ) )
|
||||
{
|
||||
keyEvent.SetEventType( wxEVT_CHAR );
|
||||
tlw->GetEventHandler()->ProcessEvent( keyEvent );
|
||||
tlw->HandleWindowEvent( keyEvent );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user