fix(tao): dispatch recognized trackpad pinch as Compose Scale events (#660) - #662
Draft
kdroidFilter wants to merge 1 commit into
Draft
fix(tao): dispatch recognized trackpad pinch as Compose Scale events (#660)#662kdroidFilter wants to merge 1 commit into
kdroidFilter wants to merge 1 commit into
Conversation
…660) Forward platform pinch (AppKit magnify, GDK pinch, Windows Ctrl+wheel) as ScaleStart / ScaleChange / ScaleEnd at the cursor instead of two synthetic Touch contacts 120 px off it. Rotation stays two-finger Touch; Compose has no rotation event.
kdroidFilter
marked this pull request as draft
September 7, 2026 11:38
|
confirmed this works well with maplibre compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #660.
Platform-recognized pinch (AppKit magnify, GDK pinch, Windows Ctrl+wheel) was replayed as two synthetic
PointerType.Touchcontacts 120 px either side of the cursor. That sent an already-recognized gesture through Compose touch recognition again: span/slop delay, release momentum, and contacts that could miss the target or hit neighbouring chrome (the MapLibre edge interruptions).What changed
ScaleStart/ScaleChange/ScaleEndat the cursor, withscaleGestureFactoras the per-event ratio (1 + NSEvent.magnification, GDK's ratio, or the Windows/Linux Ctrl+wheel step).dispatchTrackpadScale+TaoTrackpadScaleSession(same shape as the Tao: distinguish trackpad panning from wheel scrolling in Compose #654 pan path).ZoomTaband Trackpad Lab consume Scale events; the inspector logs them.Measured on the offscreen Tao scene (macOS, same
ComposeSceneas the host):detectTransformGesturescallbacks (zoomMotion1.2 px vs ~18 px slop)transformablezoom = 1.01 immediatelydetectTransformGesturesdoes not see Scale events (Compose 1.12). Apps that pinch via that API needModifier.transformableor aPointerEventType.Scale*listener — MapLibre already does.Test plan
:decorated-window-tao:test—TaoSceneTrackpadScaleTest,TaoTrackpadScaleSessionTest:examples:shared:compileKotlin/:examples:nucleus-demo:compileKotlinScaleStart/ScaleChange/ScaleEnd, map canvas zooms, two-finger swipe still pans