Skip to content

Destroy the taskbar icon when a window crashes - #86

Merged
dominicletz merged 2 commits into
mainfrom
fix/tray-cleanup-on-window-crash
Sep 13, 2026
Merged

dominicletz merged 2 commits into
mainfrom
fix/tray-cleanup-on-window-crash

Conversation

@dominicletz

Copy link
Copy Markdown
Collaborator

Summary

  • A crashed Desktop.Window used to leave the native tray icon in place.
  • Desktop.Menu now traps the parent exit, stops, and calls set_icon(nil) so the adapter can destroy the icon.
  • Window crash cleanup also stops the taskbar menu if it is still alive.

Test plan

  • NO_WX=1 mix test.fast test/desktop/menu_crash_test.exs
  • Restart an app after a window crash and confirm one tray icon.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 81ae6ac. Configure here.

Comment thread lib/desktop/menu.ex
Co-authored-by: Cursor <cursoragent@cursor.com>
@dominicletz
dominicletz merged commit f736ff4 into main Sep 13, 2026
2 checks passed
@dominicletz
dominicletz deleted the fix/tray-cleanup-on-window-crash branch September 13, 2026 16:45
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