Also show the window on right click
authorKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 16 Jun 2020 16:32:53 +0000 (18:32 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Wed, 17 Jun 2020 16:01:49 +0000 (16:01 +0000)
Note this won't work on all platforms. KDE Plasma and GNOME Shell (with
systray extension) assume that right click is necessarily for a context
menu exposed via D-Bus, there's not nice way to make the right click
popup the main dialog on those platforms.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/gui/owncloudgui.cpp

index 83af6a9bdfd6d3f1856606f663298ed1b6315c01..6c7971b2bdbd71c45216713079fcb37b605ebe1e 100644 (file)
@@ -156,9 +156,7 @@ void ownCloudGui::slotOpenSettingsDialog()
 
 void ownCloudGui::slotTrayClicked(QSystemTrayIcon::ActivationReason reason)
 {
-
-    // Left click
-    if (reason == QSystemTrayIcon::Trigger) {
+    if (reason == QSystemTrayIcon::Trigger || reason == QSystemTrayIcon::Context) {
         if (OwncloudSetupWizard::bringWizardToFrontIfVisible()) {
             // brought wizard to front
         } else if (_shareDialogs.size() > 0) {