A session could move a cursor and press it, but not scroll. The protocol already had the request -- zwlr_virtual_pointer_v1.axis(time, axis, value) -- it had simply never been implemented, in the driver or the broker. hhstream session pointer scroll <id> --axis vertical --amount 3 Positive is down (vertical) or right (horizontal): the protocol's direction, not a choice of ours, which is why direction travels in the sign and there is deliberately no up/down vocabulary layered over it. The output is whatever the last warp aimed at, exactly like a button, so scrolling somewhere else is a warp first -- and the lease is what keeps the whole gesture atomic. Bounded at 100 wheel clicks per request on both sides, because a decimal-point slip should be a refusal rather than a session scrolled somewhere unrecoverable. The resume point is re-stamped, not moved: the cursor did not go anywhere, so the coordinates are re-affirmed and only the stamp advances. Recorded in the contract as an amendment to the frozen op set, because adding an op to a frozen interface should be visible rather than implied. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
54 lines
2.9 KiB
Markdown
54 lines
2.9 KiB
Markdown
# The cursor may not appear in captures at all
|
|
|
|
## The issue
|
|
|
|
The acceptance video shows the browser searching, opening listings in separate
|
|
tabs, and a terminal running cowsay — and **no cursor anywhere**. Two candidate
|
|
causes, and they are not exclusive:
|
|
|
|
1. **The demo never moved it.** The browser beats were driven over Chromium's
|
|
CDP HTTP endpoints (`/json/new`, `/json/activate`, navigation), which inject
|
|
no pointer input at all. Nothing moved the cursor because nothing was asked
|
|
to. This part is a gap in the demo, not in the machine, and it is now
|
|
fixable: `pointer.move` warps the real cursor.
|
|
2. **A headless capture may not include the cursor image.** The compositor
|
|
normally draws the cursor as its own plane, on top of the scene, so a buffer
|
|
read back from the output can legitimately contain everything except the
|
|
pointer. Whether that is what happens here has **not been checked**.
|
|
|
|
Which one it is decides the fix, so the first step is to find out rather than
|
|
pick.
|
|
|
|
## Ideas
|
|
|
|
1. **Check before changing anything.** *(recommended)* Start a session, warp the
|
|
pointer to a known point with `pointer.move`, take a `shot`, and look —
|
|
once with the pointer parked in a corner and once beside it. One comparison
|
|
separates the two causes.
|
|
2. **If the cursor is missing from the buffer, force software cursors** in the
|
|
compositor configuration (`cursor { no_hardware_cursors = true }`). That draws
|
|
the cursor into the scene, so it lands in the capture, at the cost of a redraw
|
|
per frame — the same cost this box already pays, since there is no GPU and
|
|
rendering is software anyway. Worth measuring rather than assuming.
|
|
3. **Verify motion without pixels, for tests.** `hyprctl cursorpos` answers on
|
|
this build, so a test can assert *where* the cursor is without any image at
|
|
all. That belongs in the gates; (2) is only for the human eye.
|
|
4. **Last resort: a synthetic marker** drawn by the driver. Honest only if it is
|
|
labelled as an overlay — it proves the driver thinks the cursor is at (x, y),
|
|
which is not the same claim as the compositor putting it there.
|
|
|
|
## Why it matters
|
|
|
|
The point of moving a pointer is to act somewhere visible. If the cursor cannot
|
|
be seen in the artifact the operator is shown, then the acceptance proof for all
|
|
input work is missing, and the failure it hides is specifically the one that
|
|
matters: **a click on the wrong element looks exactly like a click on the right
|
|
one.** Both produce a screen that changed; neither shows where it happened.
|
|
|
|
There is a second-order cost too. Everything learned about the cursor — that the
|
|
compositor remembers no position per-device, that `motion_absolute` speaks
|
|
output-normalised coordinates, that a bookmark has to live in the session
|
|
record — was hard-won and is all invisible in a video with no cursor in it. The
|
|
operator cannot check any of it. That is a documentation problem the video was
|
|
supposed to solve.
|