fix: use workArea instead of bounds for initial window size

Respects taskbar on Linux (KDE etc.) and menu bar on macOS.
bounds caused the window to extend behind the taskbar on KDE.
workArea gives {x, y, width, height} of the usable screen region.
This commit is contained in:
Scott Idem
2026-05-20 17:54:05 -04:00
parent 7199d45719
commit a230ff09de

View File

@@ -18,13 +18,13 @@ async function createWindow() {
cachedFullConfig = await fetchFullConfig(cachedSeed);
}
const { bounds } = screen.getPrimaryDisplay();
const { workArea } = screen.getPrimaryDisplay();
mainWindow = new BrowserWindow({
width: bounds.width,
height: bounds.height,
x: bounds.x,
y: bounds.y,
width: workArea.width,
height: workArea.height,
x: workArea.x,
y: workArea.y,
title: 'OSIT Aether Launcher (Native)',
webPreferences: {
preload: path.join(__dirname, '../preload/index.js'),