Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Fix menu crash when used from opened native dialog. #97678

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion platform/macos/godot_menu_delegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ - (BOOL)menuHasKeyEquivalent:(NSMenu *)menu forEvent:(NSEvent *)event target:(id
} 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];
}
}
}

Expand Down
Loading