Skip to content

fix(windows): preserve tray icon visibility on Explorer restart#325

Merged
amrbashir merged 3 commits into
tauri-apps:devfrom
Y-ASLant:fix/windows-visibility-on-explorer-restart
Jun 10, 2026
Merged

fix(windows): preserve tray icon visibility on Explorer restart#325
amrbashir merged 3 commits into
tauri-apps:devfrom
Y-ASLant:fix/windows-visibility-on-explorer-restart

Conversation

@Y-ASLant

Copy link
Copy Markdown
Contributor

When Windows Explorer restarts (e.g. after system restart or crash), the TaskbarCreated message causes all tray icons to re-register. Previously this was unconditional, so a hidden tray icon would reappear.

Track visibility state in TrayUserData and only re-register on TaskbarCreated if the icon was visible.

Also fixes #289 (error on close when TrayIcon is not visible).

When Windows Explorer restarts (e.g. after system restart or crash), the
TaskbarCreated message causes all tray icons to re-register. Previously
this was unconditional, so a hidden tray icon would reappear.

Track visibility state in TrayUserData and only re-register on
TaskbarCreated if the icon was visible.

Also fixes tauri-apps#289 (error on close when TrayIcon is not visible).
@amrbashir

Copy link
Copy Markdown
Member

Thank you, could you also add a change file .changes directory?

Add covector change file for PR tauri-apps#325:
- Preserve tray icon visibility on Explorer restart
- Fix error on close when TrayIcon is not visible
Comment thread .changes/fix-tray-icon-visibility-explorer-restart.md Outdated

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@amrbashir amrbashir merged commit 7adc007 into tauri-apps:dev Jun 10, 2026
10 checks passed
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.

Error on close if TrayIcon not visible (windows)

2 participants