Initialized rect with zeros
As per @zcbenz 's remark: The rect should be initialized with zeros to prevent random values being passed to the click event handler when `Shell_NotifyIconGetRect` fails.
This commit is contained in:
parent
16c08e7e37
commit
cac97cca0d
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ void NotifyIcon::HandleClickEvent(const gfx::Point& cursor_pos,
|
||||||
icon_id.hWnd = window_;
|
icon_id.hWnd = window_;
|
||||||
icon_id.cbSize = sizeof(NOTIFYICONIDENTIFIER);
|
icon_id.cbSize = sizeof(NOTIFYICONIDENTIFIER);
|
||||||
|
|
||||||
RECT rect;
|
RECT rect = { 0 };
|
||||||
Shell_NotifyIconGetRect(&icon_id, &rect);
|
Shell_NotifyIconGetRect(&icon_id, &rect);
|
||||||
|
|
||||||
NotifyClicked(gfx::Rect(rect));
|
NotifyClicked(gfx::Rect(rect));
|
||||||
|
|
Loading…
Reference in a new issue