diff --git a/atom/browser/ui/win/notify_icon.cc b/atom/browser/ui/win/notify_icon.cc index 99b7153631af..955a047fe1f5 100644 --- a/atom/browser/ui/win/notify_icon.cc +++ b/atom/browser/ui/win/notify_icon.cc @@ -49,7 +49,16 @@ void NotifyIcon::HandleClickEvent(const gfx::Point& cursor_pos, bool left_mouse_click) { // Pass to the observer if appropriate. if (left_mouse_click) { - NotifyClicked(); + NOTIFYICONIDENTIFIER icon_id; + memset(&icon_id, 0, sizeof(NOTIFYICONIDENTIFIER)); + icon_id.uID = icon_id_; + icon_id.hWnd = window_; + icon_id.cbSize = sizeof(NOTIFYICONIDENTIFIER); + + RECT rect = { 0 }; + Shell_NotifyIconGetRect(&icon_id, &rect); + + NotifyClicked(gfx::Rect(rect)); return; } diff --git a/docs/api/tray.md b/docs/api/tray.md index ae2a471856e9..d85ac1a1dac8 100644 --- a/docs/api/tray.md +++ b/docs/api/tray.md @@ -55,7 +55,7 @@ Creates a new tray icon associated with the `image`. Emitted when the tray icon is clicked. -__Note:__ The `bounds` payload is only implemented on OS X. +__Note:__ The `bounds` payload is only implemented on OS X and Windows 7 or newer. ### Event: 'double-clicked'