Chromium Code Reviews
DescriptionFlag mouse messages received when cursor is hidden.
<Begin preamble to explain the problem:>
Many Windows messages get generated after a touch event, including a
number of mouse messages. Some messages are flagged from touch, while
others are not flagged by the system. For example, WM_MOUSEMOVE is sent
long after the touch event finishes, without flags.
Previously, we tested to see if WM_MOUSEMOVE is fired when the cursor
has not moved (this is done in IsSynthesizedMouseMessage), within a
fixed timeout period from the last touch event. This strategy captures
some synthesized events, but some are sent long after the timeout,
while others don't match this test [failure cases WM_MOUSEEXIT that
does move the cursor.]
A further failure case arose when touches happen very quickly, causing
apparent mouse movement on unflagged mouse events. Experimentally, we
found that tracking a number of recent touch locations would let us
flag all (most?) synthesized mouse events, but the number of locations
we needed to track was sometimes very large. This touch tracking seems
very hacky, and I'm not confident that it would ever work reliably or
efficiently. [This case degnerates badly with multitouch.]
</end preamble.>
Independently, Windows hides the mouse cursor when touch is active,
and restores it when the mouse is active. This patch flags mouse
events that are fired when the cursor is hidden. Chromium ui elements
(such as hover states or tooltips) can choose to ignore such events.
BUG=699668
Patch Set 1 #Patch Set 2 : Inverted IsWindowsCursorVisible to IsWindowsCursorHidden #Patch Set 3 : Rebase #
Messages
Total messages: 15 (4 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||