From 16c08e7e374718be487f566d557c2bdb1ba356ea Mon Sep 17 00:00:00 2001 From: Seppe Stas Date: Mon, 8 Jun 2015 19:04:56 +0200 Subject: [PATCH] Switched to `gfx::Rect` constructor that takes a RECT As per @zcbenz's suggestion the rect passed to the click event handler now passes a rect constructed using `gfx::Rect(const RECT& r)`. --- atom/browser/ui/win/notify_icon.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/atom/browser/ui/win/notify_icon.cc b/atom/browser/ui/win/notify_icon.cc index d3195398..473a2bca 100644 --- a/atom/browser/ui/win/notify_icon.cc +++ b/atom/browser/ui/win/notify_icon.cc @@ -58,9 +58,7 @@ void NotifyIcon::HandleClickEvent(const gfx::Point& cursor_pos, RECT rect; Shell_NotifyIconGetRect(&icon_id, &rect); - int width = rect.right - rect.left; - int height = rect.bottom - rect.top; - NotifyClicked(gfx::Rect(rect.left, rect.top, width, height)); + NotifyClicked(gfx::Rect(rect)); return; } -- 2.43.0