Skip to content

refactor: move draggable regions to WebContents#36230

Merged
nornagon merged 3 commits intomainfrom
refactor-draggable-regions-again
Nov 7, 2022
Merged

refactor: move draggable regions to WebContents#36230
nornagon merged 3 commits intomainfrom
refactor-draggable-regions-again

Conversation

@nornagon
Copy link
Contributor

@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 recently label Nov 1, 2022

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

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
Contributor 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.

2 participants