From a071e653c8e2b9b77c412600c3d35de814541527 Mon Sep 17 00:00:00 2001 From: "finnur@chromium.org" Date: Thu, 3 Sep 2009 20:58:01 +0000 Subject: Fix 9867: Activating the previous/next buttons with the keyboard in the find bar should not change the focus. Add param const Event& event to ButtonPressed, so that recipients can find out more about the event that generated the ButtonPress message. BUG=9687 TEST=Open www.google.com and open Find-in-page, search for 'e'. Press FindNext button with mouse and note that the focus should be on the textfield. Now press Tab twice to put focus on the FindNext button and press SpaceBar a few times. Note that the focus should stay on the FindNext button. Review URL: http://codereview.chromium.org/188016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25367 0039d316-1c4b-4281-b951-d872f2087c98 --- views/event.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'views/event.h') diff --git a/views/event.h b/views/event.h index ee9a838..882f558 100644 --- a/views/event.h +++ b/views/event.h @@ -87,6 +87,16 @@ class Event { return (flags_ & EF_ALT_DOWN) != 0; } + bool IsMouseEvent() const { + return type_ == ET_MOUSE_PRESSED || + type_ == ET_MOUSE_DRAGGED || + type_ == ET_MOUSE_RELEASED || + type_ == ET_MOUSE_MOVED || + type_ == ET_MOUSE_ENTERED || + type_ == ET_MOUSE_EXITED || + type_ == ET_MOUSEWHEEL; + } + #if defined(OS_WIN) // Returns the EventFlags in terms of windows flags. int GetWindowsFlags() const; -- cgit v1.1