diff options
author | kali <kali@leap.se> | 2021-02-03 22:49:03 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-02-08 23:32:19 +0100 |
commit | 44c69b1e73aa1d408f8b0567bd5d910728e31c3c (patch) | |
tree | 6fc0882e7ecce23fe66c640ce9b3e960b3a287b8 /gui/qml/main.qml | |
parent | a7dcea9a6e6e5b4b2eccc2ed0d6803c8408ffd0e (diff) |
[bug] fix segfault in osx with activation
this is a regression that was introduced with previous changes to the
menus in windows. activation segfaults in linux and osx, so capture the event
only for windows. did not investigate further about the causes, but it seems
like a good workaround for the time being.
Diffstat (limited to 'gui/qml/main.qml')
-rw-r--r-- | gui/qml/main.qml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 17fb005..5d431bd 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -142,19 +142,20 @@ ApplicationWindow { break case SystemTrayIcon.Context: console.debug("activated: context") - if (Qt.platform.os !== "linux") { + /* segfaults in osx and linux */ + if (Qt.platform.os === "windows") { menu.open() } break case SystemTrayIcon.DoubleClick: console.debug("activated: double click") - if (Qt.platform.os !== "linux") { + if (Qt.platform.os === "windows") { menu.open() } break case SystemTrayIcon.Trigger: console.debug("activated: left click") - if (Qt.platform.os !== "linux") { + if (Qt.platform.os === "windows") { menu.open() } break @@ -180,12 +181,14 @@ ApplicationWindow { // Helper to show notification messages function showNotification(msg) { console.log("Going to show notification message: ", msg); + /* if (supportsMessages) { let appname = ctx ? ctx.appName: "VPN"; showMessage(appname, msg, null, 15000); } else { console.log("System doesn't support systray notifications"); } + */ } menu: Menu { |