feat: add tray.focus() (#19548)
This commit is contained in:
parent
ed3b69ffb1
commit
03debb4ef9
7 changed files with 28 additions and 0 deletions
|
@ -176,6 +176,15 @@ void NotifyIcon::RemoveBalloon() {
|
|||
LOG(WARNING) << "Unable to remove status tray balloon.";
|
||||
}
|
||||
|
||||
void NotifyIcon::Focus() {
|
||||
NOTIFYICONDATA icon_data;
|
||||
InitIconData(&icon_data);
|
||||
|
||||
BOOL result = Shell_NotifyIcon(NIM_SETFOCUS, &icon_data);
|
||||
if (!result)
|
||||
LOG(WARNING) << "Unable to focus tray icon.";
|
||||
}
|
||||
|
||||
void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
|
||||
AtomMenuModel* menu_model) {
|
||||
// Returns if context menu isn't set.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue