Bug: `explorer.exe` restarting results in missing icon

#276 · closed · 1 comments

View on GitHub ↗

elibroftw

When testing our app, we found that the icon went missing without any exception in the logs. When I asked Claude to review, it said that when `explorer.exe` restarts, the tray icon does not handle `TaskbarCreated` broadcast. I confirmed this is a bug on Windows 11 by clicking restart on `explorer.exe` in Task Manager. The fix without WinUIEx changes it to use PInvoke + RegisterWindowMessage and recrete the winuiex notifyicon ourselves. Note that I'm calling it notifyicon (as per msft docs) even though Winuiex calls it `TrayIcon`

Comments

dotMorten

Nice find! Fixed.