From 0a0a794fdf67da3fe00a9e10f52ef7a611bb4081 Mon Sep 17 00:00:00 2001 From: "johng%corel.com" Date: Thu, 12 Apr 2001 19:10:23 +0000 Subject: [PATCH] Fix for re-entrancy problem with menus git-svn-id: svn://10.0.0.236/trunk@92107 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/qt/nsWidget.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/widget/src/qt/nsWidget.cpp b/mozilla/widget/src/qt/nsWidget.cpp index 2f363f6fcb6..6cdaae570ea 100644 --- a/mozilla/widget/src/qt/nsWidget.cpp +++ b/mozilla/widget/src/qt/nsWidget.cpp @@ -607,8 +607,12 @@ nsresult nsWidget::CreateWidget(nsIWidget *aParent, CreateNative(parentWidget); Resize(aRect.width,aRect.height,PR_FALSE); - qApp->processEvents(1); - + if (mIsToplevel || IsDialog()) { + /* We have to Spin the Qt Event loop to make non-modal dialogs */ + /* and top level windows come up with the correct size, but it */ + /* creates problems for menus, etc. */ + qApp->processEvents(1); + } DispatchStandardEvent(NS_CREATE); return NS_OK; }