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: don't unnecessarily copy draggable regions #21704

Merged

Conversation

CezaryKulakowski
Copy link
Contributor

@CezaryKulakowski CezaryKulakowski commented Jan 8, 2020

In some calls to BrowserWindow::UpdateDraggableRegions the parameter
regions points to object's variable draggable_regions_ which we later
try to update with data received in the parameter. In these cases coping
is unnecessary. Additionally after this code is executed draggable_regions_
would be empty and as a result whole window would be undraggable.
In our project which uses Electron it's possible to create frameless window
which doesn't repect css option webkit-app-region: drag and is undraggable
because of this problem but it would be hard to create one for clean
Electron.

Description of Change

Checklist

Release Notes

Notes: Fixed an issue that could cause frameless windows to become undraggable in some circumstances.

In some calls to `BrowserWindow::UpdateDraggableRegions` the parameter
`regions` points to object's variable `draggable_regions_` which we later
try to update with data received in the parameter. In these cases coping
is unnecessary. Additionally after this code is executed `draggable_regions_`
would be empty and as a result whole window would be undraggable.
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 8, 2020
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

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

Thanks, good catch!

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jan 9, 2020
@nornagon nornagon merged commit f461dc7 into electron:master Jan 9, 2020
@release-clerk
Copy link

release-clerk bot commented Jan 9, 2020

Release Notes Persisted

Fixed an issue that could cause frameless windows to become undraggable in some circumstances.

@trop
Copy link
Contributor

trop bot commented Jan 9, 2020

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

@trop
Copy link
Contributor

trop bot commented Jan 9, 2020

I have automatically backported this PR to "7-1-x", please check out #21723

@sofianguy sofianguy added this to Fixed in 8.0.0-beta.6 in 8.2.x Jan 14, 2020
@sofianguy sofianguy added this to Fixed in 7.1.9 in 7.2.x Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
7.2.x
Fixed in 7.1.9
8.2.x
Fixed in 8.0.0-beta.6
Development

Successfully merging this pull request may close these issues.

None yet

2 participants