Fix systray icon sometimes not appearing after login

This commit is contained in:
Cameron Gutman 2023-05-11 00:15:49 -05:00
parent 53125ffeca
commit 71dcef8259

View File

@ -212,6 +212,12 @@ namespace system_tray {
return 1;
}
}
// Wait for the shell to be initialized before registering the tray icon.
// This ensures the tray icon works reliably after a logoff/logon cycle.
while (GetShellWindow() == nullptr) {
Sleep(1000);
}
#endif
if (tray_init(&tray) < 0) {