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

AppWindow is wrongly resized when changing Fullscreen to Normal mode #641

Open
Commode3 opened this issue Jan 23, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Commode3
Copy link

Describe the bug

On an AppWindow, when setting its WindowState to Fullscreen, then resetting it to Normal, the window doesn't revert the size and position; instead it resizes to the entire screen.

Lightest Sample Project to demonstrate the issue

AppWindowFullscreenBug.zip

Desktop/Platform specs

  • OS: Windows 11 24H2
  • AvaloniaUI: 11.2.3 (latest)
  • FluentAvalonia: 2.2.0 (latest)

Additional context

This issue can be observed in the attached sample project (same as above).

After debugging the code (of the master branch), this bug occurs because the AppWindow size is saved using the Win32 API after Avalonia has already changed the size by itself. Therefore, the restored size is wrong.

I'm about to create a PR that fixes this bug. Actually, according to my limited tests, only a conditional move of the OnPropertyChanged propagation (when the fullscreen is enabled) is needed.
However, I might be mistaken, as I may not have reviewed all the AppWindow breaking changes that could prevent this fix.

@Commode3 Commode3 added the bug Something isn't working label Jan 23, 2025
@Commode3 Commode3 changed the title AppWindow is wrongly resize when changing Fullscreen to Normal mode AppWindow is wrongly resized when changing Fullscreen to Normal mode Jan 23, 2025
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