New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Window resizes when setting resizable: false #31233
Comments
I can confirm that #31078 causes the problem. For some reason window gets event WM_SIZE after thick frame is enabled/disabled. I'd created simple test app and I checked that it's not a standard winapi's behaviour so Electron must somehow invoke the resize. I'm trying to figure out where it happens. |
This bug is not really a regression from #31078. The problem was also present before this change landed but it was not so clearly visible: we wasn't updating the Windows' cache so it was necessary to force the redraw by e.g. minimizing and restoring the window to observe the resize. There are three issues here:
Every time when resize is disabled and window is minimized and restored it's size is shrinken by 10 pixels and after few itearations only titlebar remains. This can be fixed by changing order of setting size constraints and setting window's style via call to Following commit fixes the problem:
but If we would like to fix all three issues I would suggest to:
Please let me know what you think about it. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue. |
This is still a problem with Electron 21 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
repros in v23 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
bump |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
repros in v26 |
Preflight Checklist
Electron Version
13.5.1
What operating system are you using?
Windows
Operating System Version
Windows 10 21H1
What arch are you using?
x64
Last Known Working Electron version
13.4.0
Expected Behavior
Window should keep size when calling setResizable(false).
Actual Behavior
Window (and content size) increases by 10px when calling setResizable(false).
Testcase Gist URL
https://gist.github.com/CliffReimers/cfc4784579006b79cef11c34c3a042b5
Additional Information
Probably caused by #31078.
The text was updated successfully, but these errors were encountered: