fix: fire close event upon closing modal BrowserWindow in macOS (#19014)
* fix: emit close event from modal on macOS * fix: Move fn call to correct spot * refactor: call notify fn directly
This commit is contained in:
parent
f62d9f1411
commit
cc223d7cd2
1 changed files with 2 additions and 0 deletions
|
@ -492,6 +492,8 @@ void NativeWindowMac::Close() {
|
|||
// When this is a sheet showing, performClose won't work.
|
||||
if (is_modal() && parent() && IsVisible()) {
|
||||
[parent()->GetNativeWindow().GetNativeNSWindow() endSheet:window_];
|
||||
// Manually emit close event (not triggered from close fn)
|
||||
NotifyWindowCloseButtonClicked();
|
||||
CloseImmediately();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue