From ff2de5928b1031d6946807f1e119b0765bc755c8 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 6 Feb 2012 14:14:11 +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 Change-Id: Icc4902cbeac99eb631e569167227d9bcd4d4dcbb Reviewed-by: Richard Moe Gustavsen --- 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 3205578..8bd876a 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -3116,7 +3116,7 @@ void onApplicationChangedActivation( bool activated ) qt_mac_update_cursor(); } 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