mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
fix: try to fix macos close to tray issue
can not be sure . though the code will have not side effect.
This commit is contained in:
parent
803ec13b98
commit
cc9b64876f
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue