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>
55 lines
2.9 KiB
Markdown
55 lines
2.9 KiB
Markdown
# Containers are built, tested, and switched off
|
|
|
|
## The issue
|
|
|
|
A session can be given its own container — its own headless output and a
|
|
numbered workspace — but **no window can be assigned to it**.
|
|
|
|
The broker stamps an identity on each session's app and matches a windowrule on
|
|
`match:initial_class`, on the assumption that an allowlisted app will carry that
|
|
stamp. None of them does: chromium reaches the compositor through a wrapper
|
|
script whose flags do not set a per-session class, and `foot` has no such
|
|
option. Every allowlisted app therefore lands in the *base* class set, the
|
|
broker judges it foreign to every container, and quarantines it.
|
|
|
|
The consequence is that enabling containers makes sessions unusable — which is
|
|
how this was found: not in tests, but live, immediately after the first switch
|
|
that enabled them. Containers are now off
|
|
(`containers_enabled = false`), and every session reports
|
|
`container: {state: "degraded", output: null}`, deliberately, so a disabled
|
|
machine cannot be mistaken for one whose compositor is down.
|
|
|
|
## Ideas
|
|
|
|
1. **Adopt windows by the pid the compositor already reports.** *(recommended)*
|
|
`hyprctl clients -j` gives each client's pid, and the broker already knows each
|
|
session's pid — so the join is a lookup, and **no app has to take part**. No
|
|
stamp, no per-app flags, and it works for programs that will never co-operate.
|
|
It must use `(pid, starttime)` rather than pid alone, because the wrapper
|
|
replaces its own argv and that is exactly the pid-reuse confusion already
|
|
fixed once in `procmon`.
|
|
2. **Per-app identity argument, where one exists.** chromium accepts
|
|
`--class=hh-<id>`, so the wrapper could pass the session's value. Cheap for
|
|
chromium, and dead weight for every other app: it makes the allowlist a list of
|
|
apps that cooperate.
|
|
3. **Keep the stamp, set it in each wrapper.** Same shape as (2), more moving
|
|
parts, same ceiling.
|
|
4. **Hybrid: pid first, stamp as a fallback.** Only worth it if some app reports
|
|
no pid at all; the compositor's `-1` sentinel for "absent pid" already covers
|
|
the reporting side.
|
|
|
|
## Why it matters
|
|
|
|
The isolation milestone does not deliver while this is open. Sessions still
|
|
share one output and tile over each other on the same screen — two concurrent
|
|
sessions are both `ready` and both visible at once. Per-session ownership today
|
|
is bookkeeping only: a runtime directory, an idle clock, captured output, an
|
|
audit trail.
|
|
|
|
So the difference between what the design claims ("a session owns a workspace")
|
|
and what the machine does ("a session is an app on a shared screen") is entirely
|
|
this one join. And note which failure mode to expect on the way: the *first*
|
|
half of the feature — creating outputs and workspaces — worked on the first
|
|
attempt and looked fine right up until an app was put in one. A green container
|
|
test proves the compositor accepted the commands, not that anything arrived.
|