Fix tray visibility toggle crash#5839
Merged
Merged
Conversation
Use Tauri tray visibility APIs instead of removing the tray icon from the IPC worker thread.
✅ Deploy Preview for old-char canceled.
|
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.
Use Tauri tray visibility APIs instead of removing the tray icon from the IPC worker thread.
Note
Low Risk
Localized tray plugin behavior change with no auth, data, or security impact; reduces risk of thread-related crashes compared to remove/recreate.
Overview
Fixes a crash when toggling tray visibility from the IPC path by keeping the tray icon registered and using Tauri’s visibility APIs instead of tearing it down.
When showing the tray,
set_visiblenow reuses an existing icon (tray.set_visible(true)) and only callscreate_tray_menu()if none exists. When hiding, it stops the recording animation as before, then hides viatray.set_visible(false)rather thanremove_tray_by_id.Reviewed by Cursor Bugbot for commit 069378d. Bugbot is set up for automated code reviews on this repo. Configure here.