X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d9713540dd22f7e81a7c11a68249f5ed35c87bd..1fa6ebf70668032c517dc32e94b8f27ef3c3e6b7:/src/gtk1/menu.cpp diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index a0cacc1ed6..3d7ac67525 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -657,13 +657,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) // Is this menu on a menubar? (possibly nested) wxFrame* frame = NULL; - wxMenu* pm = menu; - while ( pm && !frame ) - { - if ( pm->IsAttached() ) - frame = pm->GetMenuBar()->GetFrame(); - pm = pm->GetParent(); - } + if(menu->IsAttached()) + frame = menu->GetMenuBar()->GetFrame(); // FIXME: why do we have to call wxFrame::GetEventHandler() directly here? // normally wxMenu::SendEvent() should be enough, if it doesn't work @@ -1216,6 +1211,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) } #endif } + break; } default: