Explorar el Código

Merge pull request #97678 from bruvzg/fix_nd_menu

[macOS] Fix menu crash when used from opened native dialog.
Rémi Verschelde hace 11 meses
padre
commit
dedb2ff217
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      platform/macos/godot_menu_delegate.mm

+ 5 - 1
platform/macos/godot_menu_delegate.mm

@@ -102,7 +102,11 @@
 					} else {
 						// Otherwise redirect event to the engine.
 						if (DisplayServer::get_singleton()) {
-							[[[NSApplication sharedApplication] keyWindow] sendEvent:event];
+							if ([[NSApplication sharedApplication] keyWindow].sheet) {
+								[[[[NSApplication sharedApplication] keyWindow] sheetParent] sendEvent:event];
+							} else {
+								[[[NSApplication sharedApplication] keyWindow] sendEvent:event];
+							}
 						}
 					}