]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/menu.cpp
set device origin when drawing on a frame in order to not overwrite the menu/toolbar...
[wxWidgets.git] / src / gtk1 / menu.cpp
index 1d53ddd74f67976f67560272859f02fd3f51331f..3d7ac675257d55f9f63578d23c01718cbb2faf34 100644 (file)
@@ -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