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

refactor: move draggable regions to WebContents #36230

Merged
merged 3 commits into from Nov 7, 2022

Conversation

nornagon
Copy link
Member

@nornagon nornagon commented Nov 1, 2022

Description of Change

Following up from #35007, reapplying the refactors in #35603 and further moving
the draggable regions towards what they're most "tightly" bound to, i.e. the
WebContents.

Checklist

Release Notes

Notes: none

@nornagon nornagon added no-backport semver/patch backwards-compatible bug fixes labels Nov 1, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Nov 1, 2022

void NativeWindow::AddDraggableRegionProvider(
DraggableRegionProvider* provider) {
if (std::find(draggable_region_providers_.begin(),
Copy link
Member

Choose a reason for hiding this comment

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

Maybe just use std::set for draggable_region_providers_ to avoid duplicate items?

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason I chose std::list is to preserve ordering. I'm not sure if this really matters, but to be safe, I wanted it to be that the draggable region providers were checked in the order they were inserted.

@nornagon nornagon merged commit 184ac2b into main Nov 7, 2022
@nornagon nornagon deleted the refactor-draggable-regions-again branch November 7, 2022 18:15
@release-clerk
Copy link

release-clerk bot commented Nov 7, 2022

No Release Notes

MarshallOfSound added a commit that referenced this pull request Feb 21, 2023
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants