Send QCloseEvent to custom-closed Ui::Window-s.
This commit is contained in:
parent
d515956f76
commit
aeeb13bd02
1 changed files with 6 additions and 1 deletions
|
|
@ -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<void(bool)> WindowHelper::Private::toggleCustomTitleCallback() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue