summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_bar_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.cc')
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 2e9b167..492f323c 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -227,9 +227,15 @@ class BookmarkFolderButton : public views::MenuButton {
}
virtual bool IsTriggerableEvent(const views::MouseEvent& e) {
- // This is hard coded to avoid potential notification on left mouse down,
- // which we want to show the menu.
- return e.IsMiddleMouseButton();
+ // Left clicks should show the menu contents and right clicks should show
+ // the context menu. They should not trigger the opening of underlying urls.
+ if (e.GetFlags() == views::MouseEvent::EF_LEFT_BUTTON_DOWN ||
+ e.GetFlags() == views::MouseEvent::EF_RIGHT_BUTTON_DOWN)
+ return false;
+
+ WindowOpenDisposition disposition(
+ event_utils::DispositionFromEventFlags(e.GetFlags()));
+ return disposition != CURRENT_TAB;
}
virtual void Paint(gfx::Canvas *canvas) {