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: sync api::Screen wrapper method sigs to upstream #38597

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented Jun 5, 2023

Description of Change

Sync the signatures of the api::Screen's Display wrappers to match the ui::Display methods that they wrap:

  • make GetAllDisplays() const and return a const reference. Currently we're always returning a new vector.
  • make GetPrimaryDisplay() const
  • make GetDisplayNearestPoint() const
  • make GetDisplayMatching() const

Checklist

Release Notes

Notes: none

ui::Display GetAllDisplays(), GetPrimaryDisplay(), GetDisplayMatching(),
and GetDisplayNearestPoint() methods are all const, so make our wrappers
const too.

ui::Display GetAllDisplays() returns a const reference, so make our
wrapper return a const reference too. This avoids creating a new
std::vector<display::Display> each time it's called.
@ckerr ckerr added semver/patch backwards-compatible bug fixes target/24-x-y PR should also be added to the "24-x-y" branch. target/25-x-y PR should also be added to the "25-x-y" branch. target/26-x-y PR should also be added to the "26-x-y" branch. labels Jun 5, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 5, 2023
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 6, 2023
@codebytere codebytere merged commit 5931f69 into main Jun 7, 2023
18 checks passed
@codebytere codebytere deleted the refactor/match-api-screen-display-accessor-signatures-to-ui-display-counterparts branch June 7, 2023 07:28
@release-clerk
Copy link

release-clerk bot commented Jun 7, 2023

No Release Notes

@trop
Copy link
Contributor

trop bot commented Jun 7, 2023

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

@trop trop bot added in-flight/24-x-y and removed target/24-x-y PR should also be added to the "24-x-y" branch. labels Jun 7, 2023
@trop
Copy link
Contributor

trop bot commented Jun 7, 2023

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

@trop trop bot added the in-flight/25-x-y label Jun 7, 2023
@trop
Copy link
Contributor

trop bot commented Jun 7, 2023

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

@trop trop bot added in-flight/26-x-y merged/26-x-y PR was merged to the "26-x-y" branch. merged/25-x-y PR was merged to the "25-x-y" branch. merged/24-x-y PR was merged to the "24-x-y" branch and removed target/25-x-y PR should also be added to the "25-x-y" branch. target/26-x-y PR should also be added to the "26-x-y" branch. in-flight/26-x-y in-flight/25-x-y labels Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/24-x-y PR was merged to the "24-x-y" branch merged/25-x-y PR was merged to the "25-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants