diff options
author | 2017-11-03 00:15:43 +0100 | |
---|---|---|
committer | 2017-11-03 00:15:43 +0100 | |
commit | 28e993ee7cdf35019919d14b24408dd42979d8a7 (patch) | |
tree | cf9d2b5920f31f98ea9d46d9b4d12709808d3161 | |
parent | Test window.show instead of restore (diff) | |
download | ferdium-app-28e993ee7cdf35019919d14b24408dd42979d8a7.tar.gz ferdium-app-28e993ee7cdf35019919d14b24408dd42979d8a7.tar.zst ferdium-app-28e993ee7cdf35019919d14b24408dd42979d8a7.zip |
Start from pinned icon
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | src/index.js | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/package.json b/package.json index dcb05bf6a..56c02ddf2 100644 --- a/package.json +++ b/package.json | |||
@@ -32,7 +32,6 @@ | |||
32 | "classnames": "^2.2.5", | 32 | "classnames": "^2.2.5", |
33 | "electron-fetch": "^1.1.0", | 33 | "electron-fetch": "^1.1.0", |
34 | "electron-spellchecker": "^1.2.0", | 34 | "electron-spellchecker": "^1.2.0", |
35 | "electron-squirrel-startup": "^1.0.0", | ||
36 | "electron-updater": "^2.4.3", | 35 | "electron-updater": "^2.4.3", |
37 | "electron-window-state": "^4.1.0", | 36 | "electron-window-state": "^4.1.0", |
38 | "fs-extra": "^3.0.1", | 37 | "fs-extra": "^3.0.1", |
diff --git a/src/index.js b/src/index.js index 361ad59db..a6c7e1d85 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -2,18 +2,14 @@ import { app, BrowserWindow, shell } from 'electron'; | |||
2 | import fs from 'fs-extra'; | 2 | import fs from 'fs-extra'; |
3 | import path from 'path'; | 3 | import path from 'path'; |
4 | 4 | ||
5 | /* eslint-disable */ | ||
6 | if (require('electron-squirrel-startup')) app.quit(); | ||
7 | |||
8 | import windowStateKeeper from 'electron-window-state'; | 5 | import windowStateKeeper from 'electron-window-state'; |
9 | 6 | ||
10 | import { isDevMode, isWindows } from './environment'; | 7 | import { isDevMode, isWindows } from './environment'; |
11 | import ipcApi from './electron/ipc-api'; | 8 | import ipcApi from './electron/ipc-api'; |
12 | import Tray from './lib/Tray'; | 9 | import Tray from './lib/Tray'; |
13 | import Settings from './electron/Settings'; | 10 | import Settings from './electron/Settings'; |
14 | import { appId } from './package.json'; | 11 | import { appId } from './package.json'; // eslint-disable-line import/no-unresolved |
15 | import './electron/exception'; | 12 | import './electron/exception'; |
16 | /* eslint-enable */ | ||
17 | 13 | ||
18 | // Keep a global reference of the window object, if you don't, the window will | 14 | // Keep a global reference of the window object, if you don't, the window will |
19 | // be closed automatically when the JavaScript object is garbage collected. | 15 | // be closed automatically when the JavaScript object is garbage collected. |
@@ -32,9 +28,10 @@ if (isWindows) { | |||
32 | if (process.platform !== 'darwin') { | 28 | if (process.platform !== 'darwin') { |
33 | const isSecondInstance = app.makeSingleInstance(() => { | 29 | const isSecondInstance = app.makeSingleInstance(() => { |
34 | if (mainWindow) { | 30 | if (mainWindow) { |
35 | if (mainWindow.isMinimized()) mainWindow.show(); | 31 | if (mainWindow.isMinimized()) mainWindow.restore(); |
36 | mainWindow.focus(); | 32 | mainWindow.focus(); |
37 | } | 33 | } |
34 | return true; | ||
38 | }); | 35 | }); |
39 | 36 | ||
40 | if (isSecondInstance) { | 37 | if (isSecondInstance) { |