From b2cd0736df3d7ff503acd13d5c90c9a68c56b579 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Wed, 20 May 2026 18:14:26 -0400 Subject: [PATCH] fix: use window.maximize() instead of explicit workArea dimensions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Electron screen.workArea is unreliable on KDE — returns full bounds, causing the window to extend behind the taskbar. Delegating to the native WM via mainWindow.maximize() works correctly on KDE, macOS, and Linux. --- src/main/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 0a9374f..5d7af8c 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,4 +1,4 @@ -import { app, BrowserWindow, ipcMain, screen } from 'electron'; +import { app, BrowserWindow, ipcMain } from 'electron'; import * as path from 'path'; import * as os from 'os'; import { loadSeedConfig } from './config_loader'; @@ -18,13 +18,9 @@ async function createWindow() { cachedFullConfig = await fetchFullConfig(cachedSeed); } - const { workArea } = screen.getPrimaryDisplay(); - mainWindow = new BrowserWindow({ - width: workArea.width, - height: workArea.height, - x: workArea.x, - y: workArea.y, + width: 1280, + height: 800, title: 'OSIT Aether Launcher (Native)', webPreferences: { preload: path.join(__dirname, '../preload/index.js'), @@ -33,6 +29,10 @@ async function createWindow() { }, }); + // Let the native window manager maximize — more reliable than using screen.workArea, + // which Electron under-reports on KDE and other Linux DEs. + mainWindow.maximize(); + let targetUrl = 'http://demo.localhost:5173'; if (cachedFullConfig && cachedFullConfig.native_device) { const device = cachedFullConfig.native_device;