Don't quit on secondary window destroy by the system.

This commit is contained in:
John Preston 2022-06-15 19:59:16 +04:00
parent 06e2724731
commit 0434e520fd

View file

@ -216,7 +216,13 @@ void MainWindow::shadowsDeactivate() {
} }
void MainWindow::destroyedFromSystem() { void MainWindow::destroyedFromSystem() {
Core::Quit(); if (isPrimary()) {
Core::Quit();
} else {
crl::on_main(this, [=] {
Core::App().closeWindow(&controller());
});
}
} }
int32 MainWindow::screenNameChecksum(const QString &name) const { int32 MainWindow::screenNameChecksum(const QString &name) const {