]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/menu.cpp
The mac toolbar was redrawing buttons when not shown -
[wxWidgets.git] / src / univ / menu.cpp
index 46c328ebcbe305816b0dba22a700496c3d665463..967fa78da4a3594b87cde7a99c2852c813f53989 100644 (file)
@@ -1548,6 +1548,9 @@ void wxMenuBar::Attach(wxFrame *frame)
         SetCursor(wxCURSOR_ARROW);
 
         SetFont(wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT));
+
+        // calculate and set our height (it won't be changed any more)
+        SetSize(-1, GetBestSize().y);
     }
 
     // remember the last frame which had us to avoid unnecessarily reparenting
@@ -2292,7 +2295,8 @@ void wxMenuBar::OnDismissMenu(bool dismissMenuBar)
 
 void wxMenuBar::OnDismiss()
 {
-    ReleaseMouse();
+    if ( GetCapture() )
+        GetCapture()->ReleaseMouse();
 
     if ( m_current != -1 )
     {