Refactor window state handling in window.js and adjust frame dimensions in windows-work-area.js
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- Removed redundant window state synchronization calls in `applyWindowsStartupWindowState` to streamline the startup process.
- Updated the `clampWindowToWorkArea` function to adjust the window frame dimensions, ensuring proper fitting within the work area.
This commit is contained in:
Tom Butcher 2026-08-03 18:21:52 +01:00
parent 98ee99ae69
commit 79ee30fd25
2 changed files with 1 additions and 5 deletions

View File

@ -184,10 +184,6 @@ function applyWindowsStartupWindowState(window) {
setTimeout(() => { setTimeout(() => {
window.maximize?.() window.maximize?.()
handleWindowsWindowChange(window)
setTimeout(() => syncWindowsWebviewLayout(window), 0)
setTimeout(() => syncWindowsWebviewLayout(window), 100)
setTimeout(broadcastWindowState, 100)
}, WINDOWS_STARTUP_MAXIMIZE_DELAY_MS) }, WINDOWS_STARTUP_MAXIMIZE_DELAY_MS)
} }

View File

@ -78,6 +78,6 @@ export function clampWindowToWorkArea(window) {
return false return false
} }
window.setFrame(workArea.x, workArea.y, workArea.width, workArea.height) window.setFrame(workArea.x - 8, workArea.y, workArea.width + 16, workArea.height + 8)
return true return true
} }