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

ExtendClientAreaToDecorationsHint=True, ClientArea gets shifted to the left. #11411

Closed
cyraid opened this issue May 17, 2023 · 3 comments · Fixed by #16608
Closed

ExtendClientAreaToDecorationsHint=True, ClientArea gets shifted to the left. #11411

cyraid opened this issue May 17, 2023 · 3 comments · Fixed by #16608

Comments

@cyraid
Copy link

cyraid commented May 17, 2023

Describe the bug
When the ExtendClientAreaToDecorationsHint is set to True, it seems the Client Area gets shifted over to the left by a tiny bit. This is shown in the screenshots (I made a border white so you can see it clearer).

To Reproduce
Set ExtendClientAreaToDecorationsHint to True

Expected behavior
The client area not to get shifted to the left (probably by the amount it saved by extending?)

Screenshots
Extend to Decorations True:
image

Extend to Decorations False:
image

Desktop (please complete the following information):

  • OS: Windows 11
@cyraid cyraid added the bug label May 17, 2023
@cyraid
Copy link
Author

cyraid commented May 17, 2023

Sorry about the noise in the emails about reopening the other issue, I'll put it here.
Might be triggered by the same bug I don't know, but when using CompositionCustomVisualHandler and Skia, the Canvas is always offset up by the title bar size. This can be seen by enabling ExtendClientAreaToDecorationsHint to True and ExtendClientAreaChromeHints to NoChrome which the Canvas client area will start drawing at 0,0 (from it's UserControl) which it's supposed to.

Edit: After more testing without CanResize, it's mostly the left that's being thrown off after more testing. The Y seems to be okay.

@cyraid
Copy link
Author

cyraid commented May 17, 2023

Also seems to happen when CanResize is True and when the window is maximized.

@cyraid
Copy link
Author

cyraid commented Jun 10, 2023

@maxkatz6 I'm no longer using CompositionCustomVisualHandler and the problem still persists. It might seem like a small issue, but having everything offset when maximized means I have to have separate styles when [WindowState=Maximized] to correct those issues.

grokys added a commit that referenced this issue Aug 5, 2024
Toggling the window decorations can cause the window to be moved off screen, causing integration test failures. Until this bug is fixed, detect this and move the window to the screen origin. See #11411.
maxkatz6 pushed a commit that referenced this issue Aug 5, 2024
      Toggling the window decorations can cause the window to be moved off screen, causing integration test failures. Until this bug is fixed, detect this and move the window to the screen origin. See #11411.
maxkatz6 pushed a commit that referenced this issue Aug 12, 2024
      Toggling the window decorations can cause the window to be moved off screen, causing integration test failures. Until this bug is fixed, detect this and move the window to the screen origin. See #11411.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants