scroll: one verb, two axes, and the sign carries the direction
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>
This commit is contained in:
1 parent
d0efba0877
commit
6b395305e0
17 files changed
+642
-2
No files matched your search
@@ -70,6 +70,7 @@ class ControlServer:
|
||||
"pointer.move": self._op_pointer_move,
|
||||
"pointer.button": self._op_pointer_button,
|
||||
"pointer.click": self._op_pointer_click,
|
||||
"pointer.scroll": self._op_pointer_scroll,
|
||||
"pointer.release": self._op_pointer_release,
|
||||
"pointer.state": self._op_pointer_state,
|
||||
}
|
||||
@@ -356,6 +357,18 @@ class ControlServer:
|
||||
)
|
||||
)
|
||||
|
||||
async def _op_pointer_scroll(
|
||||
self, request: dict[str, Any], caller: dict[str, Any]
|
||||
) -> dict[str, Any]:
|
||||
return protocol.ok(
|
||||
**await self.manager.pointer_scroll(
|
||||
request.get("id"),
|
||||
request.get("lease_id"),
|
||||
request.get("axis", "vertical"),
|
||||
request.get("amount", 3),
|
||||
)
|
||||
)
|
||||
|
||||
async def _op_pointer_release(
|
||||
self, request: dict[str, Any], caller: dict[str, Any]
|
||||
) -> dict[str, Any]:
|
||||
|
||||
Reference in new issue
Block a user