X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92f1a59c288e0e181d2998a93220a73b89f675df..68a2e005a51a87df6cc445345f27443e57ab3608:/src/gtk1/menu.cpp diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index a44c91e123..f4c539a103 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -729,6 +729,10 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) pm = pm->GetParent(); } + // FIXME: why do we have to call wxFrame::GetEventHandler() directly here? + // normally wxMenu::SendEvent() should be enough, if it doesn't work + // in wxGTK then we have a bug in wxMenu::GetInvokingWindow() which + // should be fixed instead of working around it here... if (frame) { // If it is attached then let the frame send the event. @@ -738,6 +742,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) commandEvent.SetEventObject(frame); if (item->IsCheckable()) commandEvent.SetInt(item->IsChecked()); + commandEvent.SetEventObject(menu); frame->GetEventHandler()->ProcessEvent(commandEvent); }