From 3586813817b10256b2cb6a662ccfef3053c9ebd6 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 27 Oct 2023 14:18:17 +0200 Subject: [PATCH] Fix showing windows for background apps under macOS Sonoma Change implementation to use Sonoma-supported version of the application activation call. See #23893, #24003. (cherry picked from commit 695ca042895468a8ce6c1a84422882adb3c63ee9) --- docs/changes.txt | 4 ++++ src/osx/cocoa/utils.mm | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 0a8f642423..88dc34126e 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -250,6 +250,10 @@ wxMSW: - Fix MSVS warning about redundant "const" in wx/itemid.h (#23590). - Fix spurious memory leak reports when using static CRT. +wxOSX: + +- Fix showing windows for background apps under macOS Sonoma (#23893). + 3.2.3: (released 2023-10-10) ---------------------------- diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index ed93022959..bd1a8a47ce 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -110,8 +110,9 @@ void wxBell() activate = true; } - if ( activate ) - [NSApp activateIgnoringOtherApps: YES]; + if ( activate ) { + [[NSRunningApplication currentApplication] activateWithOptions: NSApplicationActivateIgnoringOtherApps]; + } } }