Skip to content

fix(ui): keep the tray-hidden window renderable on restore - #13

Open
PureJoyMind wants to merge 1 commit into
masterfrom
fix/autostart-empty-shell-linux
Open

fix(ui): keep the tray-hidden window renderable on restore#13
PureJoyMind wants to merge 1 commit into
masterfrom
fix/autostart-empty-shell-linux

Conversation

@PureJoyMind

Copy link
Copy Markdown
Contributor

Summary

  • Autostart's --minimized launch hides the main window in its Opened handler, but on Linux (and, per upstream reports, macOS) an Avalonia window hidden that way comes back from a later Show() with no content ever drawn - it sits on the desktop as a blank, inert taskbar/dock entry with nothing to interact with, forcing the user to close it from that entry's own menu.
  • Works around the underlying Avalonia rendering bug (#2994, #18148) by toggling ShowInTaskbar alongside every Hide()/Show() pair: the autostart path (App.axaml.cs), the tray icon's manual toggle, and close-to-tray (TrayIconService). Windows already hides the taskbar entry on its own when a window is hidden, so the extra toggle is a documented no-op there.
  • No existing GitHub issue covered this (checked via gh issue list), so this PR stands alone.

Test plan

  • dotnet build src/AvaDM.UI/AvaDM.UI.csproj succeeds with no warnings/errors.
  • Manually verify on Fedora KDE: enable "Start with system" in Settings, log out/in, confirm the app starts fully hidden with a working tray icon (no blank window/dock entry).
  • Manually verify the tray icon's manual hide/restore toggle and close-to-tray still show live content after restoring.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MbWs6KZHdmimuHptUjr411

A minimized autostart launch hid the main window immediately in its
Opened handler, but on Linux and macOS an Avalonia window hidden this
way comes back from a later Show() with no content ever drawn - it
sits on the desktop as a blank, inert taskbar/dock entry with nothing
to interact with, so the only way to get rid of it is closing it from
that entry's own menu. Toggling ShowInTaskbar alongside every Hide()/
Show() pair (autostart, the tray icon's manual toggle, and close-to-
tray) works around the underlying Avalonia rendering bug
(AvaloniaUI/Avalonia#2994, #18148). Windows already hides the taskbar
entry on its own, so the extra toggle is a no-op there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant