Repository navigation
fix: frameless windows do not shrink after constraints are applied on Windows - #51562
Conversation
b51831f to
5df35cd
Compare
|
/request-review @ckerr @ckerr, @mlaurencin: Since the main fixes were upstreamed, this PR is mostly tests with a small change to the GetContentSizeConstraints to inflate by insets, since size constraints are stored without them (this is not new but it didn't matter until frameless windows had insets). I was almost able to get rid of the overrides for |
|
FYI: Chromium CL 7795073 ( The CL still needs to be cherry-picked manually for older release lines whose Chromium predates it — I've put one up for |
|
I can confirm, that this commit fixing this issue (tested on E42) |
5df35cd to
4056338
Compare
|
/request-review @mlaurencin |
6a75247 to
49af926
Compare
49af926 to
2add82e
Compare
There was a problem hiding this comment.
I don't know if it is worth blocking on, but this seems seem be fixed within 1-2px error margin for scale factors 1, 1.5, and 2. However, for 1.25 I am seeing an error of 4px on the x-axis. I am fine with merging this to fix the larger errors occurring, but given that 125% is the current recommended scale on Windows, it might be good to revisit.
mlaurencin
left a comment
There was a problem hiding this comment.
Actually upon further inspection, it looks like the 125% issue on resizable true has been the case for a while now, it is just more apparent now that resizable false has been fixed. I still think it is worth looking into, but does not need to be addressed in this PR.
|
@mlaurencin thanks for testing. I intend to submit a DPI scaling solution separately. Yes, the scaling error is an issue that has existed for a long time but it’s more obvious now. I filed this last month: #51572 to track it. The basic issue with DPI is that chromium uses a very imprecise rounding method for DIP/pixel conversions. I think it just does An easy solution is to just replace the call with a float conversion at the lowest level in Chromium. It's a very small change but I don't know if it will be accepted upstream. Alternatively it would be possible to write more code in Electron to use only px bounds methods on Windows, which would avoid conversion issues. |
|
Release Notes Persisted
|
|
Hi @jkleinsc When do you think this fix will be backported to "42-x-y"? |
|
/trop run backport-to 43-x-y |
|
The backport process for this PR has been manually initiated - sending your PR to |
|
I have automatically backported this PR to "43-x-y", please check out #51954 |
|
@oalfroukh 42-x-y needs #51622 to be merged before this PR can be backported |
… Windows (electron#51562) added inset correction and resizability bounds tests
Description of Change
Fixes #51465.
Fixes #51876.
Replaces #51499. This PR requires a Chromium patch to backport: https://chromium-review.googlesource.com/c/chromium/src/+/7795073.)
Checklist
npm testpassesRelease Notes
Notes: Fixed an issue where frameless windows windows could shrink after applying constraints or toggling resizability on Windows.