Skip to content
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: drag region BrowserView calculations on macOS #28984

Merged
merged 1 commit into from May 5, 2021
Merged

fix: drag region BrowserView calculations on macOS #28984

merged 1 commit into from May 5, 2021

Conversation

codebytere
Copy link
Member

Description of Change

Closes #28405. This was originally added in #27147, but it turns out that solution masked a different root problem, which was what I later solved in #28268. However, this meant that the previous PR was relying on incorrect assumptions, and would thus offset the bounds too far. This correct it so that all offsetting is handled in a single place for BrowserViews and we can once more safely assume that defaulting to 0, 0 for x, y in the case of no drag regions will produce the desired drag configuration.

Tested with:

cc @Kilian

Checklist

Release Notes

Notes: Fixed an issue where drag regions on macOS would be offset incorrectly when no drag regions were set,

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 4, 2021
@codebytere codebytere added the semver/patch backwards-compatible bug fixes label May 4, 2021
Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic in the PR description makes sense and the PR looks fine, but I wish there was a way to write tests for this.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label May 5, 2021
@ckerr ckerr merged commit e379b45 into master May 5, 2021
@ckerr ckerr deleted the drag-ugh branch May 5, 2021 16:38
@release-clerk
Copy link

release-clerk bot commented May 5, 2021

Release Notes Persisted

Fixed an issue where drag regions on macOS would be offset incorrectly when no drag regions were set,

@trop
Copy link
Contributor

trop bot commented May 5, 2021

I have automatically backported this PR to "13-x-y", please check out #29017

@trop
Copy link
Contributor

trop bot commented May 5, 2021

I have automatically backported this PR to "11-x-y", please check out #29018

@trop
Copy link
Contributor

trop bot commented May 5, 2021

I have automatically backported this PR to "12-x-y", please check out #29019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][macOS]: browser window drag for non-zero x,y browser view bounds
3 participants