@@ -496,7 +496,9 @@ void MainWindow::notify(QString title, QString message) {
496
496
auto popup = new NotificationPopup (webEngine);
497
497
connect (popup, &NotificationPopup::notification_clicked, popup, [=]() {
498
498
if (windowState ().testFlag (Qt::WindowMinimized) ||
499
- !windowState ().testFlag (Qt::WindowActive)) {
499
+ !windowState ().testFlag (Qt::WindowActive) ||
500
+ this ->isHidden ()) {
501
+ this ->show ();
500
502
setWindowState ((windowState () & ~Qt::WindowMinimized) | Qt::WindowActive);
501
503
}
502
504
});
@@ -812,7 +814,8 @@ void MainWindow::setNotificationPresenter(QWebEngineProfile *profile) {
812
814
popup->setObjectName (" engineNotifier" );
813
815
connect (popup, &NotificationPopup::notification_clicked, popup, [=]() {
814
816
if (windowState ().testFlag (Qt::WindowMinimized) ||
815
- !windowState ().testFlag (Qt::WindowActive)) {
817
+ !windowState ().testFlag (Qt::WindowActive) || this ->isHidden ()) {
818
+ this ->show ();
816
819
setWindowState ((windowState () & ~Qt::WindowMinimized) | Qt::WindowActive);
817
820
}
818
821
});
@@ -832,7 +835,8 @@ void MainWindow::setNotificationPresenter(QWebEngineProfile *profile) {
832
835
trayIcon->disconnect (trayIcon, SIGNAL (messageClicked ()));
833
836
connect (trayIcon, &QSystemTrayIcon::messageClicked, trayIcon, [=]() {
834
837
if (windowState ().testFlag (Qt::WindowMinimized) ||
835
- !windowState ().testFlag (Qt::WindowActive)) {
838
+ !windowState ().testFlag (Qt::WindowActive) || this ->isHidden ()) {
839
+ this ->show ();
836
840
setWindowState ((windowState () & ~Qt::WindowMinimized) | Qt::WindowActive);
837
841
}
838
842
});
0 commit comments