]> 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 a0cacc1ed6c72f015de446e2cb72e8b1c3b4ba92..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
@@ -1216,6 +1211,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
                     }
 #endif
                 }
+                break;
             }
 
             default: