From d0332cbc07d487c30d83515fb3351790565ec1de Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 8 Apr 2010 09:45:59 +0000 Subject: [PATCH] switching modal loop implementation, fixes #11921 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/fontdlgosx.mm | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/osx/carbon/fontdlgosx.mm b/src/osx/carbon/fontdlgosx.mm index c9f6b041bb..9f8470c9d7 100644 --- a/src/osx/carbon/fontdlgosx.mm +++ b/src/osx/carbon/fontdlgosx.mm @@ -191,17 +191,9 @@ int RunMixedFontDialog(wxFontDialog* dialog) else [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]]; #endif - - NSModalSession session = [NSApp beginModalSessionForWindow:fontPanel]; - - for (;;) - { - if ([NSApp runModalSession:session] != NSRunContinuesResponse) - break; - } - - [NSApp endModalSession:session]; - + + [NSApp runModalForWindow:fontPanel]; + // if we don't reenable it, FPShowHideFontPanel does not work [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ; #if wxOSX_USE_CARBON -- 2.45.2