Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
wayland
wayland
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 94
    • Issues 94
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 24
    • Merge Requests 24
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • wayland
  • waylandwayland
  • Merge Requests
  • !72

Open
Opened Apr 04, 2020 by Peter Hutterer@whotDeveloper0 of 7 tasks completed0/7 tasks
  • Report abuse
Report abuse

WIP: High-resolution scroll wheel support

  • Overview 4
  • Commits 1
  • Pipelines 2
  • Changes 1

This commit adds high-resolution wheel scrolling to wl_pointer. The new event is wl_pointer.axis_v120 and carries a value representing wheel detents as fractions or multiples of 120, i.e. two wheel detents are 240, half a wheel movement is 60. This is taken straight from the Windows API which has been using this approach since Vista.

The kernel supports this as of v5.0 (see my blog post) but it's obviously HW dependent. Logitech mice are supported, otherwise any mouse that shows a ResolutionMultiplier in the hid-recorder output (most Microsoft-branded mice of the last decade).

In the kernel, high-resolution and low-resolution mouse wheel events are separate event streams and (Logitech) mice don't guarantee that old events and new events match up, i.e. you may get different numbers of hires events per wheel detent depending on scrolling speed/direction/etc. libinput implements a new set of event types LIBINPUT_EVENT_POINTER_AXIS_FINGER, LIBINPUT_EVENT_POINTER_AXIS_WHEEL, and LIBINPUT_EVENT_POINTER_AXIS_CONTINUOUS and deprecates the existing LIBINPUT_EVENT_POINTER_AXIS events.

In the wayland protocol, thanks to clients having to opt in for any specific version we can deprecate wl_pointer.axis_discrete (no longer sent to clients supporting wl_pointer v8 and above) and instead send out wl_pointer.axis_v120. This makes life reasonably simple in both the client and the compositor, backwards compat code can just take wl_pointer.axis_discrete, multiply it by 120 and life is the shape of your favourite stonefruit.

Other pieces of the stack required for this to work:

  • libinput merge request: libinput/libinput!139 updated for new approach
  • wayland merge request: !72 (this MR here) updated for new approach
  • weston merge request: weston!409 updated for new approach
  • gtk merge request: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1624
  • mutter merge request: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1177
  • XWayland merge request: xorg/xserver!118 updated for new approach
  • xf86-input-libinput merge request: xorg/driver/xf86-input-libinput!2 updated for new approach

Branch names in all cases is hi-res-scrolling.

There's also a Fedora 32 COPR with the packages (manually built so it may lag behind at times)

Still filed as WIP so we can get all pieces lined up.

cc @carlosg, @romangg, @carewolf, @ddevault, @emersion

edit 2020-05-19:

  • new version pushed, removing the old mix of v120 plus discrete, replacing it with a straightforward discrete for versions < 8 and v120 for versions >= 8
Edited May 20, 2020 by Peter Hutterer
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: wayland/wayland!72
Source branch: wip/hi-res-scrolling