X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f12721601332dfb214fbca57a66eebe3f6524f4e..c7ff293b4280dfad1e4133b51d9e93d67c722752:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 6b8510a2e4..4e92f5a423 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1217,6 +1217,28 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, return true; } +#endif // #ifndef __WXGTK20__ + +#if wxUSE_ACCEL + if (!ret) + { + wxWindowGTK *ancestor = win; + while (ancestor) + { + int command = ancestor->GetAcceleratorTable()->GetCommand( event ); + if (command != -1) + { + wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); + ret = ancestor->GetEventHandler()->ProcessEvent( command_event ); + break; + } + if (ancestor->IsTopLevel()) + break; + ancestor = ancestor->GetParent(); + } + } +#endif // wxUSE_ACCEL + // Only send wxEVT_CHAR event if not processed yet. Thus, ALT-x // will only be sent if it is not in an accelerator table. if (!ret) @@ -1262,28 +1284,9 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, } } } -#endif // #ifndef __WXGTK20__ -#if wxUSE_ACCEL - if (!ret) - { - wxWindowGTK *ancestor = win; - while (ancestor) - { - int command = ancestor->GetAcceleratorTable()->GetCommand( event ); - if (command != -1) - { - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); - ret = ancestor->GetEventHandler()->ProcessEvent( command_event ); - break; - } - if (ancestor->IsTopLevel()) - break; - ancestor = ancestor->GetParent(); - } - } -#endif // wxUSE_ACCEL + // win is a control: tab can be propagated up