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: win.center() on Windows #42195

Merged
merged 1 commit into from
May 15, 2024
Merged

fix: win.center() on Windows #42195

merged 1 commit into from
May 15, 2024

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented May 15, 2024

Description of Change

Closes #42194.
Follow-up to #42048.

Fixes an issue where the window could be incorrectly centered in some circumstances. This was happening because we should be explicitly setting the parent to nullptr in gfx::CenterAndSizeWindow and were passing the HWND instead.

Checklist

Release Notes

Notes: Fixes an issue where the window could be incorrectly centered in some circumstances when calling BrowserWindow.center()

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/30-x-y PR should also be added to the "30-x-y" branch. target/31-x-y PR should also be added to the "31-x-y" branch. labels May 15, 2024
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 15, 2024
@MarshallOfSound MarshallOfSound merged commit a54afab into main May 15, 2024
25 checks passed
@MarshallOfSound MarshallOfSound deleted the fix-screen-centering-win branch May 15, 2024 17:36
Copy link

release-clerk bot commented May 15, 2024

Release Notes Persisted

Fixes an issue where the window could be incorrectly centered in some circumstances when calling BrowserWindow.center()

@trop
Copy link
Contributor

trop bot commented May 15, 2024

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

@trop trop bot added in-flight/30-x-y and removed target/30-x-y PR should also be added to the "30-x-y" branch. labels May 15, 2024
@trop
Copy link
Contributor

trop bot commented May 15, 2024

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

@trop trop bot added in-flight/31-x-y merged/30-x-y PR was merged to the "30-x-y" branch. merged/31-x-y PR was merged to the "31-x-y" branch. and removed target/31-x-y PR should also be added to the "31-x-y" branch. in-flight/30-x-y in-flight/31-x-y labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/30-x-y PR was merged to the "30-x-y" branch. merged/31-x-y PR was merged to the "31-x-y" branch. new-pr 🌱 PR opened in the last 24 hours semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Dialog Window is not centered if moved to differnt screen
2 participants