Fixed a hang in wxYield caused by menubar fix sending size events
in a loop. Now only resizes the frame's contents if the menubar has changed height, to avoid triggering the loop. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@67149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -671,6 +671,7 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
|
||||
|
||||
void wxFrame::UpdateMenuBarSize()
|
||||
{
|
||||
int oldMenuBarHeight = m_menuBarHeight;
|
||||
m_menuBarHeight = 2;
|
||||
|
||||
// this is called after Remove with a NULL m_frameMenuBar
|
||||
@@ -687,7 +688,8 @@ void wxFrame::UpdateMenuBarSize()
|
||||
}
|
||||
|
||||
// resize window in OnInternalIdle
|
||||
GtkUpdateSize();
|
||||
if (oldMenuBarHeight != m_menuBarHeight)
|
||||
GtkUpdateSize();
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
Reference in New Issue
Block a user