Fix systray icon sometimes not appearing after login
This commit is contained in:
parent
53125ffeca
commit
71dcef8259
1 changed files with 6 additions and 0 deletions
|
|
@ -212,6 +212,12 @@ namespace system_tray {
|
||||||
return 1;
|
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
|
#endif
|
||||||
|
|
||||||
if (tray_init(&tray) < 0) {
|
if (tray_init(&tray) < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue