[BUG] app resizes to half size after close each time
Description
This bug happens for a user, it might happen because of this:
To Reproduce
- Have 2 monitors
- Have 2 different scaling ratios on them (150% and 200% for example)
- Close app, reopen, see it change size (maybe move from one screen to other first)
Expected behavior
App remembers its size
Actual behavior
Size reduced to 50% in width and to 50% original height
Additional context
We're using electron-window-state
Might be this bug: https://github.com/mawie81/electron-window-state/issues/80 and a potential solution is shared there.
Maybe find another library; here's one:
- https://github.com/xupea/stateful-electron-window/
- https://www.npmjs.com/package/stateful-electron-window
More details from user:
The issue seems to have been caused by the “Scale and layout” settings. Setting both monitors to the same scaling ratio resolved the problem. Also, when I moved VHA to the 4K monitor and restarted it, the bug did not appear.
I’ve found a temporary workaround for now. By going into the VHA properties, under the Compatibility tab, and adjusting the “High DPI settings” so that the DPI is controlled by the application, the shrinking window bug no longer occurs.