diff options
author | 2022-05-10 07:35:35 +0530 | |
---|---|---|
committer | 2022-05-10 07:35:35 +0530 | |
commit | 7d3024668b3cb1b8f530220dfcf130d9acba8dee (patch) | |
tree | 0394a83458d775b0026e3a5344801ecf56131765 /src/mainwindow.cpp | |
parent | 419ffb29d24e50c2d0a222ec8003fa35050cf1ac (diff) | |
download | whatsie-7d3024668b3cb1b8f530220dfcf130d9acba8dee.tar.gz whatsie-7d3024668b3cb1b8f530220dfcf130d9acba8dee.zip |
chore: window show behavior
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d5e1b10..b828593 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -482,11 +482,11 @@ void MainWindow::notify(QString title, QString message) { settings.value("notificationTimeOut", 9000).toInt()); trayIcon->disconnect(trayIcon, SIGNAL(messageClicked())); connect(trayIcon, &QSystemTrayIcon::messageClicked, trayIcon, [=]() { - if (windowState() == Qt::WindowMinimized || - windowState() != Qt::WindowActive) { + if (windowState().testFlag(Qt::WindowMinimized) || + !windowState().testFlag(Qt::WindowActive)) { activateWindow(); - raise(); - showNormal(); + //raise(); + this->show(); } }); } else { @@ -854,7 +854,7 @@ void MainWindow::fullScreenRequested(QWebEngineFullScreenRequest request) { request.accept(); } else { webEngine->showNormal(); - this->showNormal(); + this->show(); request.accept(); } } @@ -976,7 +976,7 @@ void MainWindow::iconActivated(QSystemTrayIcon::ActivationReason reason) { if (isVisible()) { hide(); } else { - showNormal(); + this->show(); } } @@ -984,7 +984,7 @@ void MainWindow::messageClicked() { if (isVisible()) { hide(); } else { - showNormal(); + this->show(); } } |