| … | … | @@ -148,6 +148,58 @@ function windowFitsWithinDisplay( | |
| 182 | + | } | |
| 183 | + | const source = displayMatching(normalBounds, displays) ?? target; | |
| 184 | + | const width = Math.min(normalBounds.width, target.width); | |
| 185 | + | const height = Math.min(normalBounds.height, target.height); | |
🟡 Medium window/DesktopWindow.ts:185
On a display shorter than 620px, this returns a normalBounds.height below the settings minimum; for example, a 600px display produces height 600. normalizeMainWindowBounds then rejects the bounds, causing readPersistableState to return null and persistCurrentBounds to skip saving the new window state, including the maximized flag. Preserve settings-valid bounds when the target display is smaller than the minimum so the state is still persisted.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/desktop/src/window/DesktopWindow.ts around line 185: |
| 2 | |
| 3 | On a display shorter than 620px, this returns a `normalBounds.height` below the settings minimum; for example, a 600px display produces height 600. `normalizeMainWindowBounds` then rejects the bounds, causing `readPersistableState` to return `null` and `persistCurrentBounds` to skip saving the new window state, including the maximized flag. Preserve settings-valid bounds when the target display is smaller than the minimum so the state is still persisted. |