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:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user