diff --git a/app/main.cpp b/app/main.cpp index e940126..a1e442e 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -63,7 +63,12 @@ int main(int argc, char *argv[]) FileOpenEventHandler * fileOpenEventHandler = new FileOpenEventHandler(&a); a.installEventFilter(fileOpenEventHandler); a.connect(fileOpenEventHandler, &FileOpenEventHandler::fileOpen, [&w](const QUrl & url){ - if (w.isHidden()) w.showNormal(); + if (w.isHidden()) { + w.setWindowOpacity(1); + w.showNormal(); + } else { + w.activateWindow(); + } w.showUrls({url}); w.initWindowSize(); }); diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index a836d70..9763573 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -71,7 +71,11 @@ MainWindow::MainWindow(QWidget *parent) m_exitAnimationGroup->addAnimation(m_fadeOutAnimation); m_exitAnimationGroup->addAnimation(m_floatUpAnimation); connect(m_exitAnimationGroup, &QParallelAnimationGroup::finished, +#ifdef Q_OS_MAC + this, &QWidget::hide); +#else this, &QWidget::close); +#endif GraphicsScene * scene = new GraphicsScene(this);