From ac3158332b11df42bee681a8b7a9aa0a188b6d19 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sat, 23 Feb 2019 20:06:33 +0200 Subject: [PATCH] [macOS] Make `move_window_to_foreground` to take focus in addition to moving window to front. --- platform/osx/os_osx.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 225e0aee063..4e4d9c9eea8 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -2324,7 +2324,8 @@ bool OS_OSX::is_window_maximized() const { void OS_OSX::move_window_to_foreground() { - [window_object orderFrontRegardless]; + [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; + [window_object makeKeyAndOrderFront:nil]; } void OS_OSX::set_window_always_on_top(bool p_enabled) {