X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a26e0bc1fd195e4d9ed78b5090eef4a0ef75987a..e044f6001e70d815f72d3911ce6bd01255847ecd:/src/univ/menu.cpp diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index 4151a95236..967fa78da4 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -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 @@ -2293,7 +2296,7 @@ void wxMenuBar::OnDismissMenu(bool dismissMenuBar) void wxMenuBar::OnDismiss() { if ( GetCapture() ) - ReleaseMouse(); + GetCapture()->ReleaseMouse(); if ( m_current != -1 ) {