Skip to content
This repository was archived by the owner on Jan 14, 2022. It is now read-only.

Commit afb19c6

Browse files
committed
fixed window not maximize on first run
1 parent f7e2b14 commit afb19c6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/app-window.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ function createWindow (app) {
3131
if (process.env.NODE_ENV === 'dev') {
3232
mainWindow.webContents.openDevTools()
3333
}
34+
const screen = electron.screen.getPrimaryDisplay()
35+
if (
36+
windowSize.width >= screen.size.width &&
37+
windowSize.height >= screen.size.height - 1
38+
) {
39+
mainWindow.maximize()
40+
}
3441
// prevent the app from quitting
3542
mainWindow.on('close', e => {
3643
if (!isQuitting) {

0 commit comments

Comments
 (0)