This is a beta build for testing purposes, intended to address issues reported in #48 and #44. Further testing has found that:
- The issue is caused by fractional DPI scale factors (e.g. 1.25, 1.5 - any fractional value)
- This is an open problem for Electron since 2017 (issue 10862 in Electron, plus 10972) and continues to be so
- Changes were made between v41 and v44 around framed windows that likely contributed
- DPI coordinates were mismatched between physical and logical pixels with the old app logic, and the functionality was too basic and too trusting
- Live window parameter fetching was inaccurate due to all of the above, resulting in windows appearing off-screen or increasing size/migrating across the display
- Coordinate drift was compounded by this being saved on each movement and re-applied "blind trust" each time
Bug Fixes & Tweaks
- Removed
ensureWinVisibleas no longer needed - Re-worked initialization to get window size and position values from config (fallback if not)
- Re-wrote
changePosition()to rely less on programmatic values and take hard-coded config values to stop drift and other DPI issues - Tried to maintain consistency between physical and logical pixel positioning
- Re-worked window size clamping to account for other changes
- Added debounce for window movements and resizing
- Added additional config to the
browserWindowinstance to try and prevent Windows making decisions - Retained previous guards from Charlie
- Includes some additional
isDestroyed()checks - these may (probably will be) removed for production if they interfere or cause unintended behavior
Notes
Build tested on Windows following my ability to reproduce the issue - tested working. Despite prior testing with DPI and resolution varieties, the issue only now manifested - this is likely due to the complex relationship between physical/logical pixels, DPI scaling, Windows window behavior (shadows, padding) and Electron itself.
There may be some small unrelated bugs due to the quantity of changes made and the changes themselves modifying the window lifecycle. These will be addressed by the next full release.
!!Corrupt values!! - if your config file contains corrupt or invalid size or positional values, you may wish to change them manually or fresh install. I have tried to account for invalid bounds, but something to be aware of.
Release Hash
| Filename | SHA256 Hash |
|---|---|
| 98ea50df9a397eae0125aec09c7cca67fd2247b1b06cf47779a09a83e47a84bc | Home Assistant Desktop-v1.7.2-win-x64-DELTA.exe |