diff options
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js index 484191f2e..9dfbb4d8f 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -35,6 +35,7 @@ import { | |||
35 | import { mainIpcHandler as basicAuthHandler } from './features/basicAuth'; | 35 | import { mainIpcHandler as basicAuthHandler } from './features/basicAuth'; |
36 | import ipcApi from './electron/ipc-api'; | 36 | import ipcApi from './electron/ipc-api'; |
37 | import Tray from './lib/Tray'; | 37 | import Tray from './lib/Tray'; |
38 | import DBus from './lib/DBus'; | ||
38 | import Settings from './electron/Settings'; | 39 | import Settings from './electron/Settings'; |
39 | import handleDeepLink from './electron/deepLinking'; | 40 | import handleDeepLink from './electron/deepLinking'; |
40 | import { isPositionValid } from './electron/windowUtils'; | 41 | import { isPositionValid } from './electron/windowUtils'; |
@@ -213,6 +214,9 @@ const createWindow = () => { | |||
213 | // Initialize System Tray | 214 | // Initialize System Tray |
214 | const trayIcon = new Tray(); | 215 | const trayIcon = new Tray(); |
215 | 216 | ||
217 | // Initialize DBus interface | ||
218 | const dbus = new DBus(trayIcon); | ||
219 | |||
216 | // Initialize ipcApi | 220 | // Initialize ipcApi |
217 | ipcApi({ | 221 | ipcApi({ |
218 | mainWindow, | 222 | mainWindow, |
@@ -223,6 +227,9 @@ const createWindow = () => { | |||
223 | trayIcon, | 227 | trayIcon, |
224 | }); | 228 | }); |
225 | 229 | ||
230 | // Connect to the DBus after ipcApi took care of the System Tray | ||
231 | dbus.start(); | ||
232 | |||
226 | // Manage Window State | 233 | // Manage Window State |
227 | mainWindowState.manage(mainWindow); | 234 | mainWindowState.manage(mainWindow); |
228 | 235 | ||
@@ -265,6 +272,7 @@ const createWindow = () => { | |||
265 | mainWindow.hide(); | 272 | mainWindow.hide(); |
266 | } | 273 | } |
267 | } else { | 274 | } else { |
275 | dbus.stop(); | ||
268 | app.quit(); | 276 | app.quit(); |
269 | } | 277 | } |
270 | }); | 278 | }); |