Repository navigation
fix: return correct bounds on will-resize - #19639
Conversation
|
Will this also take position change into account? I'm not a expert at reading the electron code base. What I'm worried about is that when the user grabs one of the For example: If I have a window at (x=10, y=10, width=20, height=30) and drag the left edge and move my mouse 5 pixels the So, please check this and make sure this behavior is provided. it is on windows. Thank you very much 👍 |
|
Perfect 😍 Thank you |
3ca3ae9 to
45b8cb2
Compare
|
Release Notes Persisted
|
|
I was unable to backport this PR to "5-0-x" cleanly; |
|
I was unable to backport this PR to "6-0-x" cleanly; |
|
I have automatically backported this PR to "7-0-x", please check out #19680 |
|
So nice, thanks a lot @deermichel 😍 |
|
A maintainer has manually backported this PR to "6-0-x", please check out #19704 |
|
A maintainer has manually backported this PR to "5-0-x", please check out #19705 |
|
I believe there is a bug here. The |
|
+1 to @davej comment. When resizing from the bottom edge, I see y origin in newBounds differs from y origin in current bounds. Is there any way to workaround this issue and/or a plan to fix? Looking for some way to detect that a user has dragged the browser window from the bottom edge. |

Description of Change
Fixes #19611.
Use
gfx::ScreenRectFromNSRectto refer to the window's top-left corner as origin instead of the bottom-left one.No tests since
will-resizecannot be triggered programmatically - correct me if i'm wrong :)cc @codebytere @pmkary
Checklist
npm testpassesRelease Notes
Notes: Fixed BrowserWindow's
will-resizeevent returning wrong bounds on macOS.