-
Notifications
You must be signed in to change notification settings - Fork 15k
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
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::ScreenRectFromNSRect
to refer to the window's top-left corner as origin instead of the bottom-left one.No tests since
will-resize
cannot be triggered programmatically - correct me if i'm wrong :)cc @codebytere @pmkary
Checklist
npm test
passesRelease Notes
Notes: Fixed BrowserWindow's
will-resize
event returning wrong bounds on macOS.