Skip to content

Fix vanishing system tray icon#869

Merged
sabrogden merged 1 commit intosabrogden:masterfrom
dcog989:fix-vanishing-system-tray-icon
Jun 15, 2025
Merged

Fix vanishing system tray icon#869
sabrogden merged 1 commit intosabrogden:masterfrom
dcog989:fix-vanishing-system-tray-icon

Conversation

@dcog989
Copy link
Copy Markdown
Contributor

@dcog989 dcog989 commented Jun 8, 2025

When Ditto starts, if "Display icon in system tray" option is disabled in the settings, we show tray icon for 40 seconds before hiding it.

The Problem

The timer's handler in CMainFrame::OnTimer unconditionally hides the tray icon when it fires after 40 seconds. It does not re-check the current state of the "Display icon in system tray" option.

Race Condition

If a user opens the options dialog within that 40-second window, enables the tray icon, and clicks "OK" or "Apply", the icon is correctly shown. However, the original 40-second timer is still active. When it fires, it executes m_trayIcon.Hide() regardless of the user's recent setting change, causing the icon to disappear unexpectedly.

More?

I think there may be another issue which I haven't found but this fix seems reasonable. Tested and all good.

@sabrogden sabrogden merged commit d564a06 into sabrogden:master Jun 15, 2025
1 check passed
@dcog989 dcog989 deleted the fix-vanishing-system-tray-icon branch June 16, 2025 03:08
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.

2 participants