Ensure that we tag mouse messages synthesized by Windows in response to touch events with the ui::EF_FROM_TOUCH flag.
There are mouse events which are synthesized by Windows for touch messages which don't have the magic message
extra information which identifies them as synthesized messages. As per msdn a possible way to detect these
messages is to compare the message times for these messages and the last touch message and whether the position
is different from the current cursor position. These messages are generated by Windows within 500ms of the last
touch message.
We incorporate this in a function HWNDMessageHandler::IsSynthesizedMouseMessage function which returns true
if the above is true.
The other changes are as below:-
1. We need to allow synthesized mouse exit events through even if mouse events are marked as disabled on the
cursor client. This ensures that hover state on buttons, etc is cleared. This is covered by an aura unittest.
WindowEventDispatcherTest.DispatchSyntheticMouseExitAfterMouseEventsDisabled
2. The CompoundEventFilter::UpdateCursor function should not attempt to update the cursor for mouse messages
flagged as coming from touch. This ensures that we don't make the cursor visible if we receive spurious mouse
messages from touch input. This is covered by a wm core unittest.
CompoundEventFilterTest.DontShowCursorOnMouseMovesFromTouch
BUG=326933
R=sky@chromium.org, tdanderson@chromium.org
Review URL: https://codereview.chromium.org/
214383006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261807 0039d316-1c4b-4281-b951-d872f2087c98