8000 fix: Frameless window shows frame while opening by rzhao271 · Pull Request #35189 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Frameless window shows frame while opening #35189

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

Merged
merged 4 commits into from
Aug 16, 2022

Conversation

rzhao271
Copy link
Contributor
@rzhao271 rzhao271 commented Aug 2, 2022

Description of Change

Fixes #30760

The frame was showing because #29594 removed the CanResize accessor on the Electron side, which made it so that WidgetDelegate::CanResize started initially returning false. I have to do more investigation to see why CanResize returning false early on leads to the frame showing up. I have confirmed that the issue doesn't have to do with SetCanResize making the widget emit OnSizeConstraintsChanged.

Note that this PR only fixes the issue frameless windows that are resizable. It does not fix the issue for frameless windows that are not resizable (see #30024 (comment)).

CC @deepak1556

Checklist

Release Notes

Notes: Fixed an issue where frameless resizable windows showed Window 7 style frames while opening.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Aug 2, 2022
@rzhao271 rzhao271 force-pushed the rzhao271/frameless-window branch 2 times, most recently from b28d0ea to 3c20e29 Compare August 3, 2022 16:26
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Aug 9, 2022
@rzhao271 rzhao271 marked this pull request as ready for review August 11, 2022 18:17
@rzhao271 rzhao271 requested review from a team as code owners August 11, 2022 18:17
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Aug 11, 2022
Copy link
Member
@deepak1556 deepak1556 left a comment
8000

Choose a reason for hiding this comment

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

For context on this change please read up microsoft/vscode#146683 (comment)

What we are doing in this PR is restoring the behavior of framless resizable windows to have the same styles as before 172ac25 . Basically the presence of WS_THICKFRAME before the widget creation has an impact on the NC messages received and hiding the resizable frame. We still don't know why this happens and we are following up with DWM team on windows to understand better so that we can also fix this for the non-resizable frameless scenario #30024.

@rzhao271 rzhao271 requested a review from deepak1556 August 12, 2022 21:11
@zcbenz zcbenz added semver/patch backwards-compatible bug fixes target/19-x-y target/21-x-y PR should also be added to the "21-x-y" branch. labels Aug 15, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Aug 15, 2022
@rzhao271 rzhao271 force-pushed the rzhao271/frameless-window branch from e416ee1 to 5eee138 Compare August 15, 2022 16:53
@rzhao271 rzhao271 force-pushed the rzhao271/frameless-window branch from 5eee138 to 1c0f118 Compare August 15, 2022 16:54
@MarshallOfSound MarshallOfSound merged commit 947f1b0 into electron:main Aug 16, 2022
@release-clerk
Copy link
release-clerk bot commented Aug 16, 2022

Release Notes Persisted

Fixed an issue where frameless resizable windows showed Window 7 style frames while opening.

@trop
Copy link
Contributor
trop bot commented Aug 16, 2022

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

@trop
Copy link
Contributor
trop bot commented Aug 16, 2022

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

@trop
Copy link
Contributor
trop bot commented Aug 16, 2022

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

@trop trop bot added in-flight/20-x-y and removed target/20-x-y target/21-x-y PR should also be added to the "21-x-y" branch. labels Aug 16, 2022
@rzhao271 rzhao271 deleted the rzhao271/frameless-window branch August 16, 2022 21:43
@trop trop bot added merged/20-x-y merged/21-x-y PR was merged to the "21-x-y" branch. and removed in-flight/20-x-y labels Aug 17, 2022
@miniak
Copy link
Contributor
miniak commented Aug 28, 2022

/trop run backport-to 18-x-y

@trop
Copy link
Contributor
trop bot commented Aug 28, 2022

The backport process for this PR has been manually initiated - sending your PR to 18-x-y!

@trop
Copy link
Contributor
trop bot commented Aug 28, 2022

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

schetle pushed a commit to schetle/electron that referenced this pull request Nov 3, 2022
* fix: Frameless window shows frame while opening

* Clarify comments

* Inline setter

* Edit comment
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* fix: Frameless window shows frame while opening

* Clarify comments

* Inline setter

* Edit comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/21-x-y PR was merged to the "21-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Frameless window displays frame while opening
5 participants
0