-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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]: setBounds make BrowserWindows larger every time on Windows #27651
Comments
Do you have a multi-monitor setup with different DPI settings? Kind of a related issue here with non-resizable windows. |
gist copy of @Fndroid's testcase: https://gist.github.com/ckerr/36a1dd373498591b58b2a788b3ec87da |
Might be an issue requiring a specific setup, e.g. Windows-only. I'm not able to reproduce this on Ubuntu 20.10 with reported version. Tested by running the gist in Fiddle with Electron v11.2.3 and repeatedly minimizing / restoring the application's window. As per @pushkin's suggestion about multimonitor being a factor, I tried minimizing / restoring from both monitors on a multimonitor setup. Output looked like this:
The change in x, y between lines 3 and 4 is from me dragging the window to the second monitor. |
I can repro this exactly on Windows 10, 2 monitors, and different DPI settings (the latter bit was key). The primary monitor is set to 125% and the second to 100%. Seems very much related to the linked issue. |
It seems that this issue is related to the zoom factor of the system. I tried 125%, 150%, 175%, 200% and 225% on a 3840x2160 monitor and all even numbers are fine but odd numbers are not. Besides, macOS do not have this issue whild testing. I think it might be a lead to locate the glitch. |
+1. Can confirm it’s related to mis-matched display zoom settings on >1 monitor setups with Windows 10. @Fndroid’s explanation is the best I’ve seen so far! Does indeed look related to odd zoom numbers. |
Having same issue on Windows 10, 11.2.2 Have 2 displays with 3840x2160 resolultion, both on 175% dpi. |
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 Electron 21 |
same to you, any solution? |
I have the same problem when scaling a window across all displays of varying scale factor. I am presently sticking to an implementation that works only on monitors with same scale factor. It's not ideal. A solution for this is greatly appreciated. |
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! |
Still an issue. |
repros in Electron 20 |
I had the same issue, it made infinite loop and frozen the app |
OK,I also had this problem |
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 |
Bump. |
bump |
Hi Electron Team, Thanks in advance! |
There is still an issue. |
Yep still an issue in electron 30. |
Preflight Checklist
Issue Details
Expected Behavior
setBounds
to output ofgetBounds
makes no effect to BrowserWindows sizeActual Behavior
setBounds
to output ofgetBounds
makes BrowserWindows size larger every timesetBounds
calledTo Reproduce
main.js
index.html
Screenshots
Additional Information
The text was updated successfully, but these errors were encountered: