Commit c4ff8816 authored by Harry Cutts's avatar Harry Cutts Committed by Commit Bot

Reland "libgestures_glue: send wheel resolution flag to gestures library"

This is a reland of 3b95e462

Original change's description:
> libgestures_glue: send wheel resolution flag to gestures library
> 
> If the wheel is high resolution, the gestures library can use that to
> provide more accurate (and, in the future, responsive) scrolling. See
> https://crrev.com/c/2037035 for the gestures library implementation.
> 
> TEST=With https://crrev.com/c/2037035 patched, connect a suitable mouse
>      (such as a Logitech Anywhere MX) and enable the "Mouse High
>      Resolution Scrolling" gesture property. Check that moving the wheel
>      by fractions of a notch scrolls the page slightly.
> BUG=chromium:888172
> 
> Change-Id: I6e2b0484e5a5b5aa3422a6bb7a4c5fe2dc3ef61e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037055
> Reviewed-by: Michael Spang <spang@chromium.org>
> Commit-Queue: Harry Cutts <hcutts@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#739537}

Bug: chromium:888172
Change-Id: I10318774164d9bec0893aa1a207f951d3d511158
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2049123Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Commit-Queue: Harry Cutts <hcutts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740164}
parent 96ec90f4
......@@ -24,6 +24,10 @@
#include "ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.h"
#include "ui/gfx/geometry/point_f.h"
#ifndef REL_WHEEL_HI_RES
#define REL_WHEEL_HI_RES 0x0b
#endif
namespace ui {
namespace {
......@@ -67,6 +71,8 @@ HardwareProperties GestureHardwareProperties(
hwprops.is_button_pad = Event_Get_Button_Pad(evdev);
hwprops.has_wheel = EvdevBitIsSet(evdev->info.rel_bitmask, REL_WHEEL) ||
EvdevBitIsSet(evdev->info.rel_bitmask, REL_HWHEEL);
hwprops.wheel_is_hi_res =
EvdevBitIsSet(evdev->info.rel_bitmask, REL_WHEEL_HI_RES);
return hwprops;
}
......@@ -170,6 +176,7 @@ void GestureInterpreterLibevdevCros::OnLibEvdevCrosEvent(Evdev* evdev,
hwstate.rel_x = evstate->rel_x;
hwstate.rel_y = evstate->rel_y;
hwstate.rel_wheel = evstate->rel_wheel;
hwstate.rel_wheel_hi_res = evstate->rel_wheel_hi_res;
hwstate.rel_hwheel = evstate->rel_hwheel;
// Touch.
......
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