Skip to content

Stop tray icon updates from replaying the last balloon - #20

Merged
dominicletz merged 1 commit into
masterfrom
fix/windows-tray-balloon-replay
Nov 12, 2026
Merged

dominicletz merged 1 commit into
masterfrom
fix/windows-tray-balloon-replay

Conversation

@dominicletz

@dominicletz dominicletz commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Show Windows tray balloons from a copy of NOTIFYICONDATA so NIF_INFO is not left on the stored tray icon.
  • Keep icon updates on icon-only flags, and dismiss the balloon from notification.close without storing that flag.

Test plan

  • Show a notification, then change the tray icon several times. The balloon appears once and does not return on each icon change.
  • Call notification.close and confirm the balloon goes away.
  • Confirm a later notification.show still displays one new balloon.

Note

Low Risk
Localized Windows tray/notification handling with no auth or data-path changes; behavior should be strictly improved for icon updates and dismiss.

Overview
Fixes Windows tray behavior where icon updates re-displayed the last balloon because NIF_INFO was left on the stored NOTIFYICONDATAW.

update_tray_icon now always applies icon-only flags (NIF_MESSAGE | NIF_ICON | NIF_TIP) before NIM_MODIFY. Show and close use a copy of tray.nid for balloon Shell_NotifyIconW calls so the persisted tray entry never keeps balloon state.

Adds a real notification_close implementation (clear szInfo / title via NIF_INFO on a copy) and wires notification.close in dispatch to it instead of a no-op.

Reviewed by Cursor Bugbot for commit bdf693f. Configure here.

@dominicletz
dominicletz merged commit 45b07d3 into master Nov 12, 2026
5 checks passed
@dominicletz
dominicletz deleted the fix/windows-tray-balloon-replay branch November 12, 2026 23:14
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