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

Window moves up the screen when resizing. #581

Open
Omsad opened this issue Jun 15, 2024 · 1 comment
Open

Window moves up the screen when resizing. #581

Omsad opened this issue Jun 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Omsad
Copy link

Omsad commented Jun 15, 2024

Describe the bug
Hit the toggle button in Example.zip, the window will move up the screen as the text changes height.

Desktop/Platform:

  • OS: Windows 10
  • FluentAvalonia Version 2.0.5
  • Avalonia Version 11.1.0-rc1

Additional context
This doesn't happen when I inherit directly Window, so it appears to be a problem with the AppWindow class.

@Omsad Omsad added the bug Something isn't working label Jun 15, 2024
@Omsad
Copy link
Author

Omsad commented Jul 24, 2024

After more investigation I'm unsure about if this is a problem with FluentAvalonia or if it should be raised in Avalonia instead.

This looks to have been introduced by a change made in 11.1.0-beta1 of Avalonia, e.g. in 11.0.11 the window resizes as expected and remains in the correct location.

Looking at the changes made, it does appear that how the WM_NCCALCSIZE message is handled has been altered but I do not know enough about the various Dwm... calls to know if this is the root cause.

Interestingly if I set ExtendClientAreaToDecorationsHint = true on the AppWindow, the window will no longer move up the screen. Unfortunately this also appears to stop it from calculating it height correctly when the amount of text is changed.

Note I have also run the example on FluentAvalonia 2.1.0-preview6 and the problem remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant