Skip to content
Commit 461d325b authored by Jorge Gil's avatar Jorge Gil
Browse files

Do not mark mouse events as 'drag' on ACTION_DOWN

An ACTION_DOWN event from a mouse was previously considered
a 'drag event' even though it could also be just the start of
a simple click. This caused the Desktop Mode to consume the
click event without letting it pass through to the handle bar's
click listener, resulting in the handle menu not being shown
on mouse clicks.
Instead, let DragDetector directly forward mouse events to the
EventHandler since the it has no reason to take the slop
threshold considerations unless they're touch events.

Additionaly, adds 'drag' tracking to the window decor view model
that is agnostic of the event source instead of peeking into the
internal state of DragDetector, whose mDragEvent is now only
used to detect *touch* drags.

Bug: 270761142
Test: manual - use mouse/trackpad to click on the caption handle
bar, verify it opens the handle menu

Change-Id: I3a38acbf88f42ce9a372773599b39a893fd118e4
parent ec3a11ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment