Really close window on Mac. Show it when clicking on dock.

This commit is contained in:
Julien Wadel 2022-09-29 18:26:16 +02:00
parent 75f2056442
commit 60cc154576
2 changed files with 4 additions and 5 deletions

View file

@ -460,6 +460,10 @@ bool App::event (QEvent *event) {
}
Cli::executeCommand(url);
}else if(event->type() == QEvent::ApplicationStateChange){
auto state = static_cast<QApplicationStateChangeEvent*>(event);
if( state->applicationState() == Qt::ApplicationActive)
smartShowWindow(getMainWindow());
}
return SingleApplication::event(event);

View file

@ -41,11 +41,6 @@ function handleClosing (close) {
Qt.quit()
return
}
if (Qt.platform.os === 'osx') {
close.accepted = false
window.showMinimized()
}
}
// -----------------------------------------------------------------------------