瀏覽代碼

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

bruvzg 6 年之前
父節點
當前提交
ac3158332b
共有 1 個文件被更改,包括 2 次插入1 次删除
  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() {
 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) {
 void OS_OSX::set_window_always_on_top(bool p_enabled) {