CanAcceptFocus() now returns true if either the window itself or one of its children accepts focus; added new IsFocusable() to test whether the window itself accepts focus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1434,7 +1434,7 @@ gtk_window_button_press_callback( GtkWidget *widget,
|
||||
|
||||
g_lastButtonNumber = gdk_event->button;
|
||||
|
||||
if (win->m_wxwindow && (g_focusWindow != win) && win->CanAcceptFocus())
|
||||
if (win->m_wxwindow && (g_focusWindow != win) && win->IsFocusable())
|
||||
{
|
||||
gtk_widget_grab_focus( win->m_wxwindow );
|
||||
}
|
||||
@@ -1570,7 +1570,7 @@ gtk_window_button_press_callback( GtkWidget *widget,
|
||||
return TRUE;
|
||||
|
||||
if ((event_type == wxEVT_LEFT_DOWN) && !win->IsOfStandardClass() &&
|
||||
(g_focusWindow != win) && win->CanAcceptFocus())
|
||||
(g_focusWindow != win) && win->IsFocusable())
|
||||
{
|
||||
gtk_widget_grab_focus( win->m_wxwindow );
|
||||
}
|
||||
|
Reference in New Issue
Block a user