From c9182bc11b77675405941a0a163603cac064d8bc Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 17 Jul 2013 11:13:08 +0200 Subject: OSX: Disable window restoration for the Mac font panel because if it is automatically restored it's out of the application's control, so the user's interaction will be ignored. Change I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows by default, but the dialog helpers generate windows which aren't affected by that. Change-Id: I819d7ab4e51e90783d55cee0676dbc33b38c5b00 Reviewed-by: Shawn Rutledge --- src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/plugins/platforms/cocoa') diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index e7cf47395b..a70ba3749f 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -140,6 +140,11 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) mDialogIsExecuting = false; mResultSet = false; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) + [mFontPanel setRestorable:NO]; +#endif + [mFontPanel setTitle:QCFString::toNSString(helper->options()->windowTitle())]; if (mHelper->options()->testOption(QFontDialogOptions::NoButtons)) { -- cgit v1.2.3