[macOS] Fix menu crash when used from opened native dialog.
This commit is contained in:
parent
e3213aaef5
commit
4c8f8e6980
1 changed files with 5 additions and 1 deletions
|
@ -102,9 +102,13 @@
|
||||||
} else {
|
} else {
|
||||||
// Otherwise redirect event to the engine.
|
// Otherwise redirect event to the engine.
|
||||||
if (DisplayServer::get_singleton()) {
|
if (DisplayServer::get_singleton()) {
|
||||||
|
if ([[NSApplication sharedApplication] keyWindow].sheet) {
|
||||||
|
[[[[NSApplication sharedApplication] keyWindow] sheetParent] sendEvent:event];
|
||||||
|
} else {
|
||||||
[[[NSApplication sharedApplication] keyWindow] sendEvent:event];
|
[[[NSApplication sharedApplication] keyWindow] sendEvent:event];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Suppress default menu action.
|
// Suppress default menu action.
|
||||||
*target = self;
|
*target = self;
|
||||||
|
|
Loading…
Reference in a new issue