From 376ea66e809e6542a9732c3a47f7ad3b02b5ad09 Mon Sep 17 00:00:00 2001 From: Mark Banks Date: Mon, 11 Jul 2022 14:10:53 +1000 Subject: [PATCH] Github #210 --- Source/apple/BEMacFunctions.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/apple/BEMacFunctions.mm b/Source/apple/BEMacFunctions.mm index f7411e617..482c0503e 100644 --- a/Source/apple/BEMacFunctions.mm +++ b/Source/apple/BEMacFunctions.mm @@ -295,8 +295,9 @@ const int DisplayDialog ( std::wstring& title, std::wstring& message, std::wstri [progressDialog show: title_string description: description_string maximumValue: maximum canCancel: can_cancel]; // force fmp to display the dialog immediately - Jira #26 - [NSApp runModalForWindow: (NSWindow *)progressDialog]; - [NSApp stopModal]; + auto session = [NSApp beginModalSessionForWindow: [progressDialog window]]; + [NSApp runModalSession: session]; + [NSApp endModalSession: session]; } else { error = kWindowIsMissingError;