2019-08-15 16:37:37 -06:00
|
|
|
// Retrieve information about screen size, displays, cursor position, etc.
|
|
|
|
//
|
|
|
|
// For more info, see:
|
2023-08-10 03:55:52 -06:00
|
|
|
// https://www.electronjs.org/docs/latest/api/screen
|
2019-08-15 16:37:37 -06:00
|
|
|
|
2023-08-28 05:23:10 -06:00
|
|
|
const { app, BrowserWindow, screen } = require('electron/main')
|
2019-08-15 16:37:37 -06:00
|
|
|
|
|
|
|
let mainWindow = null
|
|
|
|
|
2020-02-03 15:43:22 -07:00
|
|
|
app.whenReady().then(() => {
|
2019-08-15 16:37:37 -06: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 09:17:09 -06:00
|
|
|
})
|