From: Cheng Zhao Date: Mon, 10 Aug 2015 04:52:55 +0000 (+0800) Subject: win: Don't emit right-clicked event when there is menu attached X-Git-Tag: v0.30.4~2^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=225140bd64e07b935d498335732b468b24c56c8c;p=electron.git win: Don't emit right-clicked event when there is menu attached --- diff --git a/atom/browser/ui/win/notify_icon.cc b/atom/browser/ui/win/notify_icon.cc index 962dc871..ebc95838 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); } }