feat: support mouse-move
event of Tray API on Windows (#19265)
* add Tray.mouse-move on win * change docs
This commit is contained in:
parent
9711fc895e
commit
2467350180
4 changed files with 15 additions and 1 deletions
|
@ -65,6 +65,13 @@ void NotifyIcon::HandleClickEvent(int modifiers,
|
|||
}
|
||||
}
|
||||
|
||||
void NotifyIcon::HandleMouseMoveEvent(int modifiers) {
|
||||
gfx::Point cursorPos = display::Screen::GetScreen()->GetCursorScreenPoint();
|
||||
// Omit event fired when tray icon is created but cursor is outside of it.
|
||||
if (GetBounds().Contains(cursorPos))
|
||||
NotifyMouseMoved(cursorPos, modifiers);
|
||||
}
|
||||
|
||||
void NotifyIcon::ResetIcon() {
|
||||
NOTIFYICONDATA icon_data;
|
||||
InitIconData(&icon_data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue