Touchpad scroll shouldn't interfere with timer-based wheel scrolling.
On ChromeOS there are two different ui events for wheel scrolling: ui:ET_SCROLL is the event type when the user scrolls with the touchpad and ui::ET_MOUSEWHEEL is the event type when the user scrolls using an external mouse wheel device. Wheel scroll latching works differently for these two types of wheel scrolling: For touchpad scrolling the sequence starts when the user touches the touchpad (on a GFC) and ends when the user lifts their fingers (on a GFS); While for wheel scrolling the sequence starts with the first wheel event and ends when no wheel event has arrived for the past 500ms. We always receive a GFC when the user puts their finger down on the touchpad, but we receive a GFS only at the end of a scroll. So without this cl if the user lifts their fingers from touchpad without scrolling, scrolling with mouse wheel will get stuck to the same scrolling sequence till the next time that the user touches the touchpad again. This cl makes sure that these two logic for latching don't interfere with each other: On arrival of a ui::ET_MOUSEWHEEL we reset the touchpad scrolling state and when the user puts their finger on the touchpad we end the timer-based latching sequence before setting the touchpad_scroll_phase_state_. Bug: 838457 Test: *.ScrollingWithExternalMouseBreaksTouchpadScrollLatching Change-Id: Id5466e5645f08e6bf44c00f4471dbb3bbf9afc89 Reviewed-on: https://chromium-review.googlesource.com/1052853 Commit-Queue: Sahel Sharifymoghaddam <sahel@chromium.org> Reviewed-by:Timothy Dresser <tdresser@chromium.org> Reviewed-by:
David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#557912}
Showing
Please register or sign in to comment