Skip to content

Commit 4ff738d

Browse files
fix: prevent window maximize on Linux via maximize event handler
1 parent c027aae commit 4ff738d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

electron/main.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ function createWindow() {
232232
minHeight: 640,
233233
title: 'Tech Stack Studios - Streamdeck',
234234
maximizable: false,
235+
fullscreenable: false,
235236
icon: iconPath,
236237
autoHideMenuBar: true,
237238
backgroundColor: '#1a1a1a',
@@ -257,6 +258,9 @@ function createWindow() {
257258
// Prevent the HTML page title from overriding the window title
258259
mainWindow.on('page-title-updated', e => { e.preventDefault() })
259260

261+
// On Linux the window manager can maximize despite maximizable:false — force it back
262+
mainWindow.on('maximize', () => mainWindow.unmaximize())
263+
260264
// Hide to tray on close unless a real quit was requested
261265
mainWindow.on('close', e => {
262266
if (!isQuitting) { e.preventDefault(); mainWindow.hide(); console.log('[App] Window hidden to tray') }

0 commit comments

Comments
 (0)