Ver Fonte

[macOS] Make `move_window_to_foreground` to take focus in addition to moving window to front.

bruvzg há 6 anos atrás
pai
commit
ac3158332b
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      platform/osx/os_osx.mm

+ 2 - 1
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) {