diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-21 11:49:34 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-21 11:49:34 +0000 |
| commit | 28835510478e6a89bcd11a31151092b95e9bcc42 (patch) | |
| tree | 88f40e9b631aa9983bc8fa2fed5251884cd510b5 | |
| parent | 3f77016fc9cfc246452c6640d9fac12a6fb21b30 (diff) | |
| download | mullvadvpn-28835510478e6a89bcd11a31151092b95e9bcc42.tar.xz mullvadvpn-28835510478e6a89bcd11a31151092b95e9bcc42.zip | |
Migrate to NSEventMonitor 0.0.2
| -rw-r--r-- | app/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/main.js b/app/main.js index f79855ca00..2b5d9f234b 100644 --- a/app/main.js +++ b/app/main.js @@ -17,11 +17,11 @@ let trayIconManager = null; const startTrayEventMonitor = (win) => { if(process.platform === 'darwin') { + const { NSEventMonitor, NSEventMask } = require('nseventmonitor'); if(macEventMonitor === null) { - const NSEventMonitor = require('nseventmonitor'); macEventMonitor = new NSEventMonitor(); } - macEventMonitor.start(() => win.hide()); + macEventMonitor.start((NSEventMask.leftMouseDown | NSEventMask.rightMouseDown), () => win.hide()); } }; |
