diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-07 14:04:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-07 14:10:43 -0300 |
| commit | bba412a3b2c83b4c6935baeaac979ead46c0a5dc (patch) | |
| tree | 00d3bede8004ff0daa7025004d7a5c4bb926ff6d /test | |
| parent | 60367d8fe23f6af98ec28e3cf6c2094dfe332df0 (diff) | |
| parent | 7545cdbf47559d4e996c7d3fc9ae8968a3342292 (diff) | |
| download | pardes-bba412a3b2c83b4c6935baeaac979ead46c0a5dc.tar.gz pardes-bba412a3b2c83b4c6935baeaac979ead46c0a5dc.zip | |
macos: merge local trackpad gestures with current upstream
Diffstat (limited to 'test')
| -rw-r--r-- | test/macos-snapshots/trackpad.golden | 2 | ||||
| -rw-r--r-- | test/macos-snapshots/trackpad.snap | 20 | ||||
| -rw-r--r-- | test/macos_e2e.swift | 8 |
3 files changed, 16 insertions, 14 deletions
diff --git a/test/macos-snapshots/trackpad.golden b/test/macos-snapshots/trackpad.golden index 631e5af9..b5f9f567 100644 --- a/test/macos-snapshots/trackpad.golden +++ b/test/macos-snapshots/trackpad.golden @@ -246,7 +246,7 @@ | 1 @p0:2:3-6 x MARK a | 2 @p0:4:3-6 x MARK b | 3 @p0:6:3-6 x MARK c -== snap force grid=100x30 cursor=57,2 +== snap exec3 grid=100x30 cursor=57,2 |New Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill | /private/tmp/pardes-macos-e2e/trackpad/cwd Save /private/tmp/pardes-macos-e2e/trackpad/cwd/+New | RK c\n' 1 diff --git a/test/macos-snapshots/trackpad.snap b/test/macos-snapshots/trackpad.snap index 05f46e1f..df843e5d 100644 --- a/test/macos-snapshots/trackpad.snap +++ b/test/macos-snapshots/trackpad.snap @@ -3,8 +3,8 @@ # # Trackpad.button(fingers:) is pure policy with no NSEvent in it, so a script # can name how many fingers were resting and get back the button a hand would -# have produced: two is acme's button 3 (Look), three or more is button 2 -# (Exec), and a deep press is button 2 by another route. pardes_take_haptic is +# have produced: two or more fingers is acme's button 2 (Exec), one finger is +# left to select, and a deep press is button 3 (Look). pardes_take_haptic is # the other half — it is how the pulse the core armed is read back on a machine # with nothing to feel it with. # @@ -36,9 +36,9 @@ haptic look snap adapter # Back to a clean slate for the finger-count cases below. haptic none -# TWO FINGERS RESTING = button 3 = Look. MARK names no file, so looking at it +# A DEEP PRESS = button 3 = Look. MARK names no file, so looking at it # searches, and the hits land in a +Search buffer split under the shell. -fingers 2 4 3 +force 4 3 wait 10000 @p0: stable 700 15000 haptic look @@ -70,18 +70,20 @@ snap scrolled wheel wheeldown 4 5 stable 700 10000 snap notched -# THREE FINGERS = button 2 = Exec. `New` in the top tag is a builtin, so this +# TWO FINGERS = button 2 = Exec. `New` in the top tag is a builtin, so this # spawns a pane rather than running something the machine would have to own. -fingers 3 1 0 +fingers 2 1 0 stable 700 20000 haptic exec snap exec -# A DEEP PRESS is the same button 2 by another route; `Newcol` proves it went +# THREE FINGERS are the same button 2, and that is the case the finger count +# exists for: macOS delivers them on the right stream exactly like two, so a +# view that trusted the stream would Look here. `Newcol` proves this one went # somewhere different from the click above. -force 5 0 +fingers 3 5 0 stable 700 20000 haptic exec -snap force +snap exec3 # One finger is still an ordinary left press, and selecting is not a verb the # hand should feel. fingers 1 4 3 diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift index 49e0a7f2..427d8314 100644 --- a/test/macos_e2e.swift +++ b/test/macos_e2e.swift @@ -644,16 +644,16 @@ private final class Driver: PardesViewDelegate { case "fingers": let view = try live() - // The whole two-finger-Look / three-finger-Exec feature, asserted - // without a trackpad: the policy is pure and lives in Trackpad, so a - // script names the finger count and gets the button a hand gets. + // The whole finger-count feature, asserted without a trackpad: the + // policy is pure and lives in Trackpad, so a script names the + // finger count and gets the button a hand gets. // // The stream is the one macOS actually uses for a multi-finger // click when its own secondary click is on, which is the default // and which is what real hardware was observed doing for BOTH two // and three fingers. Passing RIGHT here is therefore the harder // case: it is the one where a view that trusted the stream would - // call three fingers a Look. + // call every multi-finger click a Look instead of an Exec. let count = try int(args, 0, "fingers count") let cell = try gridPoint(args, 1, "fingers") let stream = count >= 2 ? PARDES_MOUSE_RIGHT : PARDES_MOUSE_LEFT |
