From 6359b8639e17668af7c9f026266cdd80bdf84141 Mon Sep 17 00:00:00 2001 From: Xavier Michelon Date: Fri, 30 Jun 2023 10:05:07 +0200 Subject: [PATCH] feat(GODT-2750): disable raise on main window when a notification is clicked on Linux. (cherry picked from commit 4e080b59d3b225f5d78c54e138f1c4f04b5037c7) --- internal/frontend/bridge-gui/bridge-gui/TrayIcon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/frontend/bridge-gui/bridge-gui/TrayIcon.cpp b/internal/frontend/bridge-gui/bridge-gui/TrayIcon.cpp index a9cb1d84..225483a3 100644 --- a/internal/frontend/bridge-gui/bridge-gui/TrayIcon.cpp +++ b/internal/frontend/bridge-gui/bridge-gui/TrayIcon.cpp @@ -189,7 +189,9 @@ TrayIcon::TrayIcon() }); connect(this, &TrayIcon::activated, this, &TrayIcon::onActivated); // some OSes/Desktop managers will automatically show main window when clicked, but not all, so we do it manually. - connect(this, &TrayIcon::messageClicked, []() { app().backend().showMainWindow("tray icon popup notification clicked"); }); + if (!onLinux()) { // we disable this on linux because of a Qt bug that causes the signal to be emitted for other apps (GODT-2750) + connect(this, &TrayIcon::messageClicked, []() { app().backend().showMainWindow("tray icon popup notification clicked"); }); + } this->show(); // TrayIcon does not expose its screen, so we connect relevant screen events to our DPI change handler.