Skip to content

macOS Tao: trackpad scroll magnitude includes display scale unlike AWT #653

Description

@sargunv

🐛 Describe the bug

On macOS, Tao and AWT report different trackpad scroll magnitudes to the same Compose content. This is separate from the horizontal sign issue in #652.

⚠️ Current behavior

We observed different trackpad pan speeds while testing maplibre/maplibre-compose#1290. Source inspection shows a difference in how display scale enters the scroll conversion:

  • OpenJDK uses scrollingDelta * 0.1, without a display-scale multiplier.
  • Tao converts logical AppKit deltas into physical pixels. TaoWindow then divides them by 10.
  • The popup conversion in MacOsWheelDelta.kt also includes display scale.

For a 10-point AppKit delta on a 2× display, these conversions predict an absolute Compose scroll delta of 1 under AWT and 2 under Tao. They predict matching magnitudes on a 1× display. This ratio is derived from source, not a recorded comparison of identical physical gestures.

✅ Expected behavior

The same Compose scroll handling should produce the same movement under AWT and Tao, independent of display scale. AWT is the reference for the AWT-compatible scroll units Nucleus exposes.

💣 Steps to reproduce

  1. Observe PointerEventType.Scroll and change.scrollDelta in identical AWT and Tao Compose content on a Retina display.
  2. Compare vertical trackpad scrolling, which avoids the separate horizontal sign issue in macOS Tao: horizontal trackpad scrolling is reversed relative to AWT #652.
  3. Repeat on a 1× display to compare the effect of display scale.

📷 Screenshots

None; this concerns input deltas.

📱 Tech info

  • Device: macOS desktop with a trackpad and Retina display.
  • OS: macOS.
  • Library/App version: Nucleus 2.5.12, Compose Multiplatform 1.12.0, OpenJDK 25.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions