amwx/FluentAvalonia

AppWindow WindowState disappears from taskbar

Opened this issue · 1 comments

AvaloniaTests.zip
Describe the bug
Since the new 11.1.0-betas when you launch an AppWindow in maximized and minalize it after it disappears from the taskbar.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop/Platform (please complete the following information):

  • OS: [e.g. Windows (11/10), linux (distro), osx, wasm, etc]
  • FluentAvalonia Version: Preview 5
  • Avalonia Version 11.1.0-beta2

Additional context
Add any other context about the problem here.

amwx commented

So I had a look at this, and this stems from some changes in the Win32 window code upstream.
This particular issue arises because WM_SHOWWINDOW is not sent when the window is launched maximized, and they changed a flag in WindowImpl to be set when that is called instead of ShowWindow() method like it used to be. (Don't ask me why it doesn't affect a regular Avalonia window - this is all I know). The end result is that they end up sending SW_HIDE to the window because the flag was never set so Avalonia thinks the window was never shown, so they hide it.

However, I also discovered another issue, if you maximize, minimize, maximize, then restore, the restore rect is incorrect and matches the maximized window. Again, related to changes from upstream.

I need to think about this, I can try to hack around your issue (though with some artifacts of doing so) but the 2nd issue is much more difficult to deal with and I doubt upstream will be much help considering I'm probably doing stuff that's "unsupported".

Avalonia11.0-beta1 does not have this issue, so remaining on that version is what I would recommend for now until I can figure out a way to resolve this.