From 225140bd64e07b935d498335732b468b24c56c8c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 10 Aug 2015 12:52:55 +0800 Subject: [PATCH] win: Don't emit right-clicked event when there is menu attached --- atom/browser/ui/win/notify_icon.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/atom/browser/ui/win/notify_icon.cc b/atom/browser/ui/win/notify_icon.cc index 962dc871b5b6..ebc958384363 100644 --- a/atom/browser/ui/win/notify_icon.cc +++ b/atom/browser/ui/win/notify_icon.cc @@ -86,8 +86,10 @@ void NotifyIcon::HandleClickEvent(const gfx::Point& cursor_pos, NotifyClicked(gfx::Rect(rect), modifiers); return; } else if (!double_button_click) { // single right click - NotifyRightClicked(gfx::Rect(rect), modifiers); - PopContextMenu(cursor_pos); + if (menu_model_) + PopContextMenu(cursor_pos); + else + NotifyRightClicked(gfx::Rect(rect), modifiers); } }