Ignore WM_MOUSEACTIVATE messages which occur in the context of touch events which...
commit5e98ead4739cb4168e6d8776e0f2c788743a321a
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 17 Mar 2014 23:12:59 +0000 (17 23:12 +0000)
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 17 Mar 2014 23:12:59 +0000 (17 23:12 +0000)
treeb562a1c757dc7dc26f2b0e5c3b3459f4129d7608
parent609b60bf1660e735b228e8e1e652c55069047248
Ignore WM_MOUSEACTIVATE messages which occur in the context of touch events which result in bubbles like bookmarks,
avatar button, being displayed.

When we touch the button which brings up the bubble, a WM_MOUSEACTIVATE message comes in much later for the main
window. This results in the window being activated which in turn hides the bubble which occurs due to an activation
change.

Fix is to ignore WM_MOUSEACTIVATE messages in the context of touch downs if we have the flag which indicates that
inactive rendering is to be faked. This does not cause activation issues when we touch/click elsewhere due to
calls to SetFocus which occur in the context of these events from the focus controller code.

The touch down context flag is reset to false in a delayed task.

The other change is to ignore WM_MOUSEACTIVATE messages in the LegacyRenderWidgetHostHWND class if the
kIgnoreTouchMouseActivateForWindow property is set on it. This property is set by the MenuController code to
prevent activation loss when the menu options are selected via touch. This is mimicing similar code in
HWNDMessageHandler.

BUG=329854,326128
R=sky@chromium.org, sky

Review URL: https://codereview.chromium.org/199593004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257522 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/renderer_host/legacy_render_widget_host_win.cc
ui/base/ui_base.gyp
ui/base/win/internal_constants.cc [new file with mode: 0644]
ui/base/win/internal_constants.h [new file with mode: 0644]
ui/views/controls/menu/menu_controller.cc
ui/views/win/hwnd_message_handler.cc
ui/views/win/hwnd_message_handler.h