🔍 A drag's duration and its event count were one knob, so "speed is the repro condition" named neither
`scripts/qmp/qmp.py` (x86 rail driving; host-side, no guest or Rust change). `drag` interpolates `steps` sub-moves per segment `hold_s` apart, and both were hardcoded at the call site. Gesture duration is therefore `steps * hold_s` per segment: a longer drag is *simultaneously* a slower one and a busier one, and the two cannot be varied independently. That matters because the residue class's one distinguishing fact was stated in terms of it. A ~6 s drag left 39 645 px of residue where a ~0.7 s drag left 386; the conclusion recorded was "speed is the repro condition". With duration welded to event count that number supports two incompatible readings — residue tracks elapsed wall-clock (some timer ages guest-owned state out mid-gesture), or it tracks pointer events (per-present accumulation, every timer exonerated) — and they point at disjoint code. Expose both as `QMP_DRAG_STEPS` and `QMP_DRAG_HOLD_S` so a caller can hold one axis fixed and move the other. No default changes: 8 and 0.02 are what the call site already passed, so every existing repro drives the guest identically. Verified: `qmp.py` parses; a 2x2 sweep (320/80 events x ~1.6/~6.4 s on one fixed path) drove the guest through all four cells on a live x86/Vulkan boot, with measured durations landing in the two intended groups (1.83-1.97 s and 6.63-6.82 s). Not verified: arm64, and the knobs are not exercised by any Rust test — this is host-side driving only.
This commit is contained in:
1 parent
917c2af486
commit
fc7c867c3d
1 file changed
+10
-2
+10
-2
@@ -13,6 +13,8 @@ GUI helpers (usb-kbd + usb-tablet on the vmapple machine; cocoa is observability
|
||||
scripts/qmp/qmp.py click X Y [--double] # guest-pixel coords
|
||||
scripts/qmp/qmp.py move X Y
|
||||
scripts/qmp/qmp.py drag X1 Y1 X2 Y2 [X3 Y3 ...] # left-button rubber-band drag through points
|
||||
QMP_DRAG_STEPS=N sub-moves interpolated per segment (default 8)
|
||||
QMP_DRAG_HOLD_S=F seconds between sub-moves (default 0.02)
|
||||
scripts/qmp/qmp.py key NAME[+NAME...] ... # e.g. key ret, key meta_l+q
|
||||
scripts/qmp/qmp.py wheel [up|down] [N] [dt] # N wheel ticks, dt seconds apart (one connection)
|
||||
scripts/qmp/qmp.py type TEXT # ASCII (shift combos handled)
|
||||
@@ -304,8 +306,14 @@ def main(argv: list[str]) -> int:
|
||||
coords = [int(a) for a in args]
|
||||
points = list(zip(coords[0::2], coords[1::2]))
|
||||
w, h = display_size(qmp)
|
||||
drag(qmp, points, w, h)
|
||||
print(f"drag {points} ok")
|
||||
# Gesture duration and pointer-event count are separately controllable so
|
||||
# a caller can hold one fixed while varying the other. A drag's residue
|
||||
# scales with one or the other, and with duration welded to event count
|
||||
# (steps * hold_s per segment) the two cannot be told apart.
|
||||
steps = int(os.environ.get("QMP_DRAG_STEPS", "8"))
|
||||
hold_s = float(os.environ.get("QMP_DRAG_HOLD_S", "0.02"))
|
||||
drag(qmp, points, w, h, steps=steps, hold_s=hold_s)
|
||||
print(f"drag {points} steps={steps} hold_s={hold_s} ok")
|
||||
return 0
|
||||
|
||||
if mode == "wheel":
|
||||
|
||||
Reference in new issue
Block a user