X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a08afcce1c9cae869f051be49c35bcfc8691ab57..41286fd1def19641be3ae5bb9666c84a1c0b5525:/src/univ/menu.cpp?ds=inline diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index 46c328ebcb..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 @@ -2292,7 +2295,8 @@ void wxMenuBar::OnDismissMenu(bool dismissMenuBar) void wxMenuBar::OnDismiss() { - ReleaseMouse(); + if ( GetCapture() ) + GetCapture()->ReleaseMouse(); if ( m_current != -1 ) {