fix(ui): keep the tray-hidden window renderable on restore - #13
Open
PureJoyMind wants to merge 1 commit into
Open
fix(ui): keep the tray-hidden window renderable on restore#13PureJoyMind wants to merge 1 commit into
PureJoyMind wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--minimizedlaunch hides the main window in itsOpenedhandler, but on Linux (and, per upstream reports, macOS) an Avalonia window hidden that way comes back from a laterShow()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.ShowInTaskbaralongside everyHide()/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.gh issue list), so this PR stands alone.Test plan
dotnet build src/AvaDM.UI/AvaDM.UI.csprojsucceeds with no warnings/errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01MbWs6KZHdmimuHptUjr411