2019-08-15 22:37:37 +00:00
|
|
|
// Retrieve information about screen size, displays, cursor position, etc.
|
|
|
|
//
|
|
|
|
// For more info, see:
|
2023-08-10 09:55:52 +00:00
|
|
|
// https://www.electronjs.org/docs/latest/api/screen
|
2019-08-15 22:37:37 +00:00
|
|
|
|
2023-08-28 11:23:10 +00:00
|
|
|
const { app, BrowserWindow, screen } = require('electron/main')
|
2019-08-15 22:37:37 +00:00
|
|
|
|
|
|
|
let mainWindow = null
|
|
|
|
|
2020-02-03 22:43:22 +00:00
|
|
|
app.whenReady().then(() => {
|
2019-08-15 22:37:37 +00:00
|
|
|
// Create a window that fills the screen's available work area.
|
|
|
|
const primaryDisplay = screen.getPrimaryDisplay()
|
|
|
|
const { width, height } = primaryDisplay.workAreaSize
|
|
|
|
|
|
|
|
mainWindow = new BrowserWindow({ width, height })
|
|
|
|
mainWindow.loadURL('https://electronjs.org')
|
2019-10-16 15:17:09 +00:00
|
|
|
})
|