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: client area inset calculation when maximized for framless windows #25052

Merged
merged 6 commits into from Aug 31, 2020

Conversation

deepak1556
Copy link
Member

@deepak1556 deepak1556 commented Aug 20, 2020

Description of Change

Fixes the following regressions introduced by #21164

Refs

microsoft/vscode#86260
microsoft/vscode#85310
microsoft/vscode#85592
microsoft/vscode#85655

Also fixes a side effect of this bug that caused increased usage of GPU under certain conditions which was identified by teams app.

Gist: https://gist.github.com/deepak1556/6e672eea191d3e5f50e429d312a56446

Checklist

Release Notes

Notes: Fixes the following issues for frameless when maximized on Windows

  • fix unreachable task bar when auto hidden with position top
  • fix 1px extending to secondary monitor
  • fix 1px overflowing into taskbar at certain resolutions
  • fix white line on top of window under 4k resolutions

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 20, 2020
@deepak1556 deepak1556 requested a review from zcbenz August 20, 2020 00:35
@deepak1556
Copy link
Member Author

From spy++

Before

Rectangle - (-8, -8)-(2568, 1408), 2576x1416 (Maximized)
Restored Rect - (880, 400)-(1680, 1000), 800x600
Client Rect - (7, 7)-(2569, 1409), 2562x1402

After

Rectangle - (-8, -8)-(2568, 1408), 2576x1416 (Maximized)
Restored Rect - (880, 400)-(1680, 1000), 800x600
Client Rect - (8, 0)-(2568, 1408), 2560x1408

@deepak1556
Copy link
Member Author

@zcbenz this is ready for review. Thanks!

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 21, 2020
@deepak1556 deepak1556 force-pushed the robo/fix_inset_calc branch 2 times, most recently from c3cc46a to a4aa256 Compare August 22, 2020 02:09
@deepak1556 deepak1556 requested a review from zcbenz August 22, 2020 03:04
shell/browser/ui/views/win_frame_view.cc Outdated Show resolved Hide resolved
shell/browser/ui/views/win_frame_view.cc Outdated Show resolved Hide resolved
shell/browser/ui/views/win_frame_view.cc Outdated Show resolved Hide resolved
@zcbenz zcbenz merged commit 068b464 into master Aug 31, 2020
@release-clerk
Copy link

release-clerk bot commented Aug 31, 2020

Release Notes Persisted

Fixes the following issues for frameless when maximized on Windows

@zcbenz zcbenz deleted the robo/fix_inset_calc branch August 31, 2020 07:55
@trop
Copy link
Contributor

trop bot commented Aug 31, 2020

@deepak1556 has manually backported this PR to "10-x-y", please check out #25216

@trop
Copy link
Contributor

trop bot commented Aug 31, 2020

@deepak1556 has manually backported this PR to "11-x-y", please check out #25217

@trop
Copy link
Contributor

trop bot commented Aug 31, 2020

@deepak1556 has manually backported this PR to "9-x-y", please check out #25218

@trop
Copy link
Contributor

trop bot commented Aug 31, 2020

@deepak1556 has manually backported this PR to "8-x-y", please check out #25219

codebytere pushed a commit that referenced this pull request Aug 31, 2020
#25052) (#25218)

* adopt per monitor scale factor

* fix: client area inset calculation when maximized

* address review feedback

* pass correct glass insets to GetDwmFrameInsetsInPixels

* remove unused code

* Windows 8 and 10 use the same DWM frame calculation

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
codebytere pushed a commit that referenced this pull request Aug 31, 2020
#25052) (#25216)

* adopt per monitor scale factor

* fix: client area inset calculation when maximized

* address review feedback

* pass correct glass insets to GetDwmFrameInsetsInPixels

* remove unused code

* Windows 8 and 10 use the same DWM frame calculation

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants