]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Don't emit right-clicked event when there is menu attached
authorCheng Zhao <zcbenz@gmail.com>
Mon, 10 Aug 2015 04:52:55 +0000 (12:52 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 10 Aug 2015 04:52:55 +0000 (12:52 +0800)
atom/browser/ui/win/notify_icon.cc

index 962dc871b5b67a4e60e2528f859b4594e8e48202..ebc95838436341d806a852deca2c4266867d2ee0 100644 (file)
@@ -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);
   }
 }