diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index ad93310f54..5ccd019a9b 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -301,6 +301,10 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) { mDialogIsExecuting = true; [mFontPanel setDelegate:self]; + // Call processEvents in case the event dispatcher has been interrupted, and needs to do + // cleanup of modal sessions. Do this before showing the native dialog, otherwise it will + // close down during the cleanup. + qApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers); [NSApp runModalForWindow:mFontPanel]; return (mResultCode == NSOKButton); } |