From 31d84838ac77bb112f9ceac0d1cae64bc9c85c16 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 3992cb2ea0..636b4fc8d0 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1734,7 +1734,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) {