diff --git a/ui/platform/mac/ui_window_mac.mm b/ui/platform/mac/ui_window_mac.mm index a7d6d87..7c698bb 100644 --- a/ui/platform/mac/ui_window_mac.mm +++ b/ui/platform/mac/ui_window_mac.mm @@ -202,7 +202,12 @@ void WindowHelper::Private::activateBeforeNativeMove() { } void WindowHelper::Private::close() { - [_nativeWindow close]; + const auto weak = Ui::MakeWeak(_owner->window()); + QCloseEvent e; + qApp->sendEvent(_owner->window(), &e); + if (e.isAccepted() && weak && _nativeWindow) { + [_nativeWindow close]; + } } Fn WindowHelper::Private::toggleCustomTitleCallback() {