From f26e9750d7dd03b445389063b4fd417a7a32684d Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 4 Jan 2012 17:58:36 +0100 Subject: Don't get stuck in a loop while trying to close the active popup widget When the application is deactivated then it will try to close down the active popup widget. However, the popup widget can prevent a close from occuring and Qt should respect this without causing problems when the application is reactivated later on. Task-number: QTBUG-23448-fix --- src/gui/kernel/qapplication_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 890d527..eadf367 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -3118,7 +3118,7 @@ void onApplicationChangedActivation( bool activated ) QMenuBar::macUpdateMenuBar(); } else { // de-activated QApplicationPrivate *priv = [[QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate] qAppPrivate]; - while (priv->inPopupMode()) + if (priv->inPopupMode()) app->activePopupWidget()->close(); if (app) { QEvent ev(QEvent::ApplicationDeactivate); -- cgit v0.12