Toplevel windows now send both activate and focus
events under wxGTK - and probably under wxMSW as well? git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1605,14 +1605,10 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(
|
||||
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;
|
||||
// ignore return value
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
@@ -1621,7 +1617,6 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
@@ -1678,14 +1673,10 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
|
||||
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;
|
||||
// ignore return value
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
@@ -1694,7 +1685,6 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -1605,14 +1605,10 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(
|
||||
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;
|
||||
// ignore return value
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
@@ -1621,7 +1617,6 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget, GdkEvent *WXUNUSED(
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
@@ -1678,14 +1673,10 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
|
||||
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;
|
||||
// ignore return value
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
@@ -1694,7 +1685,6 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEvent *WXUNUSED
|
||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_out_event" );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user