Applied BMP patch.

Applied deferred wxBitmapButton patch.
  Added error checking to wxFileStream and wxFFileStream.
  Corrected activate event things.

  All these patches work in the stable branch, the
   dev-branch does not currently compile.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2001-04-22 10:20:56 +00:00
parent b06a6b20d5
commit 942bef71b0
5 changed files with 109 additions and 60 deletions

View File

@@ -1600,14 +1600,29 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(
}
#endif // wxUSE_CARET
wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() );
event.SetEventObject( win );
if (win->GetEventHandler()->ProcessEvent( event ))
if (win->IsTopLevel())
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" );
return TRUE;
wxActivateEvent event( wxEVT_ACTIVATE, TRUE, win->GetId() );
event.SetEventObject( win );
if (win->GetEventHandler()->ProcessEvent( event ))
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" );
return TRUE;
}
}
else
{
wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() );
event.SetEventObject( win );
if (win->GetEventHandler()->ProcessEvent( event ))
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" );
return TRUE;
}
}
return FALSE;
}
@@ -1658,13 +1673,27 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
}
#endif // wxUSE_CARET
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
event.SetEventObject( win );
if (win->GetEventHandler()->ProcessEvent( event ))
if (win->IsTopLevel())
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" );
return TRUE;
wxActivateEvent event( wxEVT_ACTIVATE, FALSE, win->GetId() );
event.SetEventObject( win );
if (win->GetEventHandler()->ProcessEvent( event ))
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" );
return TRUE;
}
}
else
{
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
event.SetEventObject( win );
if (win->GetEventHandler()->ProcessEvent( event ))
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" );
return TRUE;
}
}
return FALSE;
@@ -2647,7 +2676,7 @@ void wxWindow::OnInternalIdle()
// do it only once
g_sendActivateEvent = -1;
wxActivateEvent event(wxEVT_ACTIVATE, activate, GetId());
wxActivateEvent event(wxEVT_ACTIVATE_APP, activate, GetId());
event.SetEventObject(this);
(void)GetEventHandler()->ProcessEvent(event);