Commit 78a2d824 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Fix accidental enlargement of app icon on two finger tap.

Our logic assumed that an ET_GESTURE_END will always come
after an ET_GESTURE_TAP_DOWN, this isn't true.

When a Two-finger tap (ET_GESTURE_TWO_FINGER_TAP) occurs the
event stream is ET_GESTURE_TAP_DOWN -> ET_GESTURE_TAP_CANCEL ->
ET_GESTURE_TWO_FINGER_TAP with no ET_GESTURE_END.

This CL fixes the issue by clearing the set state by ET_GESTURE_TAP_DOWN
on ET_GESTURE_TAP_CANCEL.

Bug: 809751
Change-Id: Iefeda869c70a75ba09a21fe4449b337a5cb7a826
Reviewed-on: https://chromium-review.googlesource.com/905864Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534888}
parent 7a08be58
......@@ -556,6 +556,7 @@ void ShelfButton::OnGestureEvent(ui::GestureEvent* event) {
base::Bind(&ShelfButton::OnTouchDragTimer, base::Unretained(this)));
event->SetHandled();
break;
case ui::ET_GESTURE_TAP_CANCEL:
case ui::ET_GESTURE_END:
drag_timer_.Stop();
ClearState(STATE_HOVERED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment