From 2e6c61b2c7a1e0c88c7539d5878d6bb10a96be05 Mon Sep 17 00:00:00 2001 From: Andre <200930841+Andre-Bzk@users.noreply.github.com> Date: Wed, 6 May 2026 17:47:43 +0200 Subject: [PATCH] feat: maximize window on Linux to fill screen, bump version to 0.3.3 On Linux, the primary display resolution is queried and the window is maximized on startup. This ensures a fullscreen experience both on the Steam Deck display and on external monitors/TVs when docked. Windows/dev behavior unchanged. --- package.json | 2 +- src/main/index.ts | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b2dcd81..66acffe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "twitch4steamdeck", - "version": "0.3.2", + "version": "0.3.3", "description": "Werbefreier Twitch-Client für das Steam Deck (Live & VOD, Big-Screen-UI)", "main": "out/main/index.js", "author": "twitch4steamdeck", diff --git a/src/main/index.ts b/src/main/index.ts index a35d31d..f77d0a0 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,4 +1,4 @@ -import { app, BrowserWindow, shell } from 'electron' +import { app, BrowserWindow, shell, screen } from 'electron' import { join } from 'node:path' import { AuthService } from './auth/authService' import { HelixClient } from './twitch/helixClient' @@ -9,9 +9,14 @@ import { startGamepadReader } from './input/gamepadReader' const isDev = !app.isPackaged function createWindow(): BrowserWindow { + const isLinux = process.platform === 'linux' + const { width, height } = isLinux + ? screen.getPrimaryDisplay().workAreaSize + : { width: 1280, height: 800 } + const win = new BrowserWindow({ - width: 1280, - height: 800, + width, + height, minWidth: 1024, minHeight: 640, show: false, @@ -25,7 +30,10 @@ function createWindow(): BrowserWindow { } }) - win.once('ready-to-show', () => win.show()) + win.once('ready-to-show', () => { + if (isLinux) win.maximize() + win.show() + }) win.webContents.setWindowOpenHandler(({ url }) => { shell.openExternal(url)