Left click only focuses if the event wasn't handled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1464,11 +1464,6 @@ gtk_window_button_press_callback( GtkWidget *widget,
|
||||
|
||||
g_lastButtonNumber = gdk_event->button;
|
||||
|
||||
if (win->m_wxwindow && (g_focusWindow != win) && win->AcceptsFocus())
|
||||
{
|
||||
gtk_widget_grab_focus( win->m_wxwindow );
|
||||
}
|
||||
|
||||
// GDK sends surplus button down events
|
||||
// before a double click event. We
|
||||
// need to filter these out.
|
||||
@@ -1599,6 +1594,12 @@ gtk_window_button_press_callback( GtkWidget *widget,
|
||||
if ( ret )
|
||||
return TRUE;
|
||||
|
||||
if ((event_type == wxEVT_LEFT_DOWN) &&
|
||||
(g_focusWindow != win) && win->AcceptsFocus())
|
||||
{
|
||||
win->SetFocus();
|
||||
}
|
||||
|
||||
if (event_type == wxEVT_RIGHT_DOWN)
|
||||
{
|
||||
// generate a "context menu" event: this is similar to right mouse
|
||||
|
Reference in New Issue
Block a user