mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-06 12:23:54 +01:00
fix(Windows): temporary fix to Windows 7 style frame on app startup, closes #169
This commit is contained in:
parent
0cfd7938ee
commit
1356011ba3
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -4,7 +4,8 @@
|
|||||||
"core",
|
"core",
|
||||||
"MySQL",
|
"MySQL",
|
||||||
"PostgreSQL",
|
"PostgreSQL",
|
||||||
"SQLite"
|
"SQLite",
|
||||||
|
"Windows"
|
||||||
],
|
],
|
||||||
"svg.preview.background": "transparent"
|
"svg.preview.background": "transparent"
|
||||||
}
|
}
|
@ -137,7 +137,7 @@
|
|||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
"css-loader": "^6.5.0",
|
"css-loader": "^6.5.0",
|
||||||
"electron": "^16.0.7",
|
"electron": "^16.0.8",
|
||||||
"electron-builder": "^22.14.11",
|
"electron-builder": "^22.14.11",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
|
@ -13,6 +13,7 @@ Store.initRenderer();
|
|||||||
|
|
||||||
const isDevelopment = process.env.NODE_ENV !== 'production';
|
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||||
const isMacOS = process.platform === 'darwin';
|
const isMacOS = process.platform === 'darwin';
|
||||||
|
const isWindows = process.platform === 'win32';
|
||||||
const gotTheLock = app.requestSingleInstanceLock();
|
const gotTheLock = app.requestSingleInstanceLock();
|
||||||
|
|
||||||
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true';
|
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true';
|
||||||
@ -45,6 +46,9 @@ async function createMainWindow () {
|
|||||||
backgroundColor: '#1d1d1d'
|
backgroundColor: '#1d1d1d'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (isWindows) // Temporary workaround to https://github.com/electron/electron/issues/30024
|
||||||
|
window.minimize();
|
||||||
|
|
||||||
mainWindowState.manage(window);
|
mainWindowState.manage(window);
|
||||||
window.on('moved', saveWindowState);
|
window.on('moved', saveWindowState);
|
||||||
|
|
||||||
@ -81,13 +85,6 @@ async function createMainWindow () {
|
|||||||
mainWindow = null;
|
mainWindow = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
window.webContents.on('devtools-opened', () => {
|
|
||||||
window.focus();
|
|
||||||
setImmediate(() => {
|
|
||||||
window.focus();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,6 +117,9 @@ else {
|
|||||||
mainWindow = await createMainWindow();
|
mainWindow = await createMainWindow();
|
||||||
createAppMenu();
|
createAppMenu();
|
||||||
|
|
||||||
|
if (isWindows) // Temporary workaround to https://github.com/electron/electron/issues/30024
|
||||||
|
mainWindow.focus();
|
||||||
|
|
||||||
// if (isDevelopment)
|
// if (isDevelopment)
|
||||||
// mainWindow.webContents.openDevTools();
|
// mainWindow.webContents.openDevTools();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user