diff --git a/mainwindow.cc b/mainwindow.cc index 42d00b3a..ecea5e33 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -1222,6 +1222,11 @@ void MainWindow::closeEvent( QCloseEvent * ev ) if( !cfg.preferences.searchInDock ) translateBox->setPopupEnabled( false ); +#ifdef Q_OS_MACOS + if (!event->spontaneous() || !isVisible()) { + return; + } +#endif #ifdef HAVE_X11 // Don't ignore the close event, because doing so cancels session logout if // the main window is visible when the user attempts to log out.