Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/tray_manager/windows/tray_manager_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,21 @@ std::optional<LRESULT> TrayManagerPlugin::HandleWindowProc(HWND hWnd,
tray_icon_setted = false;
_ApplyIcon();
}
} else if (message == WM_POWERBROADCAST) {
// Handle power management events (sleep/wake)
switch (wParam) {
case PBT_APMRESUMEAUTOMATIC:
case PBT_APMRESUMESUSPEND:
// System is resuming from sleep/hibernation
if (tray_icon_setted) {
// Restore the tray icon after system wakes up
tray_icon_setted = false;
_ApplyIcon();
}
break;
default:
break;
}
}
return result;
}
Expand Down