Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

On Windows, fix undecorated shadow reported client size is bigger than what's visible #3712

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

amrbashir
Copy link
Contributor

@amrbashir amrbashir commented May 28, 2024

  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

Here is before:
image

And here is after:
image

@amrbashir amrbashir requested a review from msiglreith as a code owner May 28, 2024 03:10
@amrbashir amrbashir force-pushed the fix/windows/undecorated-shadow-inner-size branch from 6d8873e to 4caf694 Compare May 30, 2024 19:36
@amrbashir amrbashir requested a review from notgull as a code owner June 22, 2024 18:03
@notgull notgull self-assigned this Jun 22, 2024
Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

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

Is there a way to reproduce this? Using the base example on the master branch, I don't see this on Windows 11.

(Looks good otherwise)

@amrbashir
Copy link
Contributor Author

I have added an example in this PR that can be used to test this, just checkout this PR and revert the changes made to src/platform_impl/windows and you should see the bug, add back the changes from this PR and you should be able to see the fix.

I am also using Windows 11, the issue seems to happen only when undecorated shadows are active.

@amrbashir amrbashir requested a review from notgull July 17, 2024 04:56
@amrbashir amrbashir marked this pull request as draft January 6, 2025 02:05
@amrbashir amrbashir marked this pull request as ready for review February 8, 2025 03:38
@amrbashir
Copy link
Contributor Author

@notgull this should be ready now, thanks to implementation of the folks at GPUI, I tested different combination of decorations and undecorated shadows and all work as expected. I tested the implementation with winit and wry as well.

I have included an example in this PR that creates a window with a border on the reported surface size which can be used to compare with master branch.

@amrbashir
Copy link
Contributor Author

This PR also has a good side effect that makes undecorated windows with shadows have native resize handles without explicitly handling WM_NCHITTEST like #2538 .

Undecorated windows with shadows are unaffected, would still need manual hittesting.

Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

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

I'm not sure if @notgull has the time to review this? If not, then I'd be fine with merging it myself (will do so in 2 weeks if John hasn't answered before then, @amrbashir please ping me if I forget).

@amrbashir
Copy link
Contributor Author

@madsmtm just a friendly remineder 😅

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

Successfully merging this pull request may close these issues.

4 participants