From a6b0f03ae95c67efff85e5898c21257ea30f9e93 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 8 Mar 2011 14:47:25 +0000 Subject: [PATCH] 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 --- src/gtk/frame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index cc2c2ee516..6ad04bc531 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -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