feat: add tray.removeBalloon() (#19547)

This commit is contained in:
Milan Burda 2019-08-05 17:52:47 +02:00 committed by Shelley Vohr
parent 8f043bbdaa
commit ee674acca4
7 changed files with 26 additions and 0 deletions

View file

@ -138,6 +138,16 @@ void NotifyIcon::DisplayBalloon(HICON icon,
LOG(WARNING) << "Unable to create status tray balloon.";
}
void NotifyIcon::RemoveBalloon() {
NOTIFYICONDATA icon_data;
InitIconData(&icon_data);
icon_data.uFlags |= NIF_INFO;
BOOL result = Shell_NotifyIcon(NIM_MODIFY, &icon_data);
if (!result)
LOG(WARNING) << "Unable to remove status tray balloon.";
}
void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
AtomMenuModel* menu_model) {
// Returns if context menu isn't set.