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;