]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Set GUID when getting icon's bounds
authorCheng Zhao <zcbenz@gmail.com>
Wed, 29 Jul 2015 04:55:44 +0000 (12:55 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 29 Jul 2015 04:55:44 +0000 (12:55 +0800)
atom/browser/ui/win/notify_icon.cc

index ed422b882a8f66d606b5a1b8d9c6b2fde24c604a..b58b5931276ca5ec7ba41dab48ec8784b869e349 100644 (file)
@@ -70,6 +70,11 @@ void NotifyIcon::HandleClickEvent(const gfx::Point& cursor_pos,
   icon_id.uID = icon_id_;
   icon_id.hWnd = window_;
   icon_id.cbSize = sizeof(NOTIFYICONIDENTIFIER);
+  if (has_tray_app_id_hash_)
+    memcpy(reinterpret_cast<void*>(&icon_id.guidItem),
+           &tray_app_id_hash_,
+           sizeof(GUID));
+
   RECT rect = { 0 };
   Shell_NotifyIconGetRect(&icon_id, &rect);