From 7d3024668b3cb1b8f530220dfcf130d9acba8dee Mon Sep 17 00:00:00 2001 From: Keshav Date: Tue, 10 May 2022 07:35:35 +0530 Subject: chore: window show behavior --- src/mainwindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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(); } } -- cgit v1.2.3