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.
This commit is contained in:
Andre
2026-05-06 17:47:43 +02:00
parent f365170ded
commit 35d3513359
2 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -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",
+12 -4
View File
@@ -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)