aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authorLibravatar Andrzej Ressel <jereksel@gmail.com>2020-01-30 00:03:02 +0100
committerLibravatar Andrzej Ressel <jereksel@gmail.com>2020-01-30 00:03:02 +0100
commitd4ba692994467ca2c28cf27bb63b9a4c67f04195 (patch)
tree12c45d568abf03f409b5654fc364aa81c39a1a6c /src/index.js
parentMerge branch 'develop' (diff)
downloadferdium-app-d4ba692994467ca2c28cf27bb63b9a4c67f04195.tar.gz
ferdium-app-d4ba692994467ca2c28cf27bb63b9a4c67f04195.tar.zst
ferdium-app-d4ba692994467ca2c28cf27bb63b9a4c67f04195.zip
Start in tray
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 12ea7f646..4c61c5c8e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -91,7 +91,7 @@ if (!gotTheLock) {
91 app.on('second-instance', (event, argv) => { 91 app.on('second-instance', (event, argv) => {
92 // Someone tried to run a second instance, we should focus our window. 92 // Someone tried to run a second instance, we should focus our window.
93 if (mainWindow) { 93 if (mainWindow) {
94 mainWindow.show(); 94 //mainWindow.show();
95 if (mainWindow.isMinimized()) { 95 if (mainWindow.isMinimized()) {
96 mainWindow.restore(); 96 mainWindow.restore();
97 } 97 }
@@ -142,6 +142,8 @@ const createWindow = () => {
142 const mainWindowState = windowStateKeeper({ 142 const mainWindowState = windowStateKeeper({
143 defaultWidth: DEFAULT_WINDOW_OPTIONS.width, 143 defaultWidth: DEFAULT_WINDOW_OPTIONS.width,
144 defaultHeight: DEFAULT_WINDOW_OPTIONS.height, 144 defaultHeight: DEFAULT_WINDOW_OPTIONS.height,
145 maximize: false,
146 fullScreen: false
145 }); 147 });
146 148
147 let posX = mainWindowState.x || DEFAULT_WINDOW_OPTIONS.x; 149 let posX = mainWindowState.x || DEFAULT_WINDOW_OPTIONS.x;
@@ -168,6 +170,7 @@ const createWindow = () => {
168 height: mainWindowState.height, 170 height: mainWindowState.height,
169 minWidth: 600, 171 minWidth: 600,
170 minHeight: 500, 172 minHeight: 500,
173 show: false,
171 titleBarStyle: isMac ? 'hidden' : '', 174 titleBarStyle: isMac ? 'hidden' : '',
172 frame: isLinux, 175 frame: isLinux,
173 backgroundColor, 176 backgroundColor,
@@ -298,6 +301,11 @@ const createWindow = () => {
298 shell.openExternal(url); 301 shell.openExternal(url);
299 } 302 }
300 }); 303 });
304
305 if (!(settings.get('enableSystemTray') && settings.get('startMinimized'))) {
306 mainWindow.show();
307 }
308
301}; 309};
302 310
303// Allow passing command line parameters/switches to electron 311// Allow passing command line parameters/switches to electron