From 0df99c1a67cb3482fe7338bc777c2248e559b6b9 Mon Sep 17 00:00:00 2001 From: "sky@google.com" Date: Mon, 9 Mar 2009 20:16:26 +0000 Subject: Fixes regression in menus. Specifically selecting by way of press, drag then release was broken. It appears that TPM_RIGHTBUTTON disallows this behavior. BUG=8560 TEST=see bug Review URL: http://codereview.chromium.org/41006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11280 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/views/menu.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/views/menu.cc b/chrome/views/menu.cc index f317718..bdc6d10 100644 --- a/chrome/views/menu.cc +++ b/chrome/views/menu.cc @@ -554,9 +554,10 @@ void Menu::RunMenuAt(int x, int y) { delegate_->MenuWillShow(); - // Show the menu. Blocks until the menu is dismissed or an item is chosen. + // NOTE: we don't use TPM_RIGHTBUTTON here as it breaks selecting by way of + // press, drag, release. See bugs 718 and 8560. UINT flags = - GetTPMAlignFlags() | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_RECURSE; + GetTPMAlignFlags() | TPM_LEFTBUTTON | TPM_RETURNCMD | TPM_RECURSE; is_menu_visible_ = true; DCHECK(owner_); // In order for context menus on menus to work, the context menu needs to -- cgit v1.1