evidence · 4.2 KiB

README.md

Committed at docs/evidence/card-shell/leaked-touch-point/README.md. This is what grounds the requirements that cite it.

Open raw source

Every edge gesture stopped until the shell restarted

Report

The operator, 2026-10-29 00:34:26 CDT, on build 37g1magg…, wrote: “all of the sudden gestures stopped working though i can’t open the app drawer at all now”. The last edge gesture in the shell journal was a side Back at 00:33:22.

What was observed (board, injected touch, grim)

These were tested between 00:36 and 00:44 with ui.py’s uinput touchscreen on the stuck session:

Cause

Taps still working means the touch-down gate fell through without consuming anything. Every edge gesture in input_down (nix/card-shell/adapter.c) starts only when wlr_seat_touch_num_points() == 0, no popup is mapped, and Sway is not emulating a pointer from touch.

The observations rule out most of these:

That leaves a seat touch point that was never released. Two facts make such a point permanent:

  1. Card-shell forwards an undecided edge touch straight to wlroots (edge_client_begin), bypassing Sway’s seatop.
  2. Sway’s default seatop has no touch_up handler. Only card-shell’s own edge_client_up or edge_cancel_client can ever release that point.

The edge path in input_up ran edge_reset(false) when its contact count reached zero, even if a forwarded point had not been released. A count can reach zero on a lift that is not the forwarded contact’s. The keyboard chord (kg_down) runs before the edge’s own second-contact handling, so it can take a second finger without the edge counting it. When that finger lifts first, the edge resets and the first finger’s point leaks.

This is inferred from the code and fits every observation. The exact sequence was not captured: the route trace (SWAY_K230_TOUCH_ROUTE_TRACE) was not enabled in that session.

Fix

The fix is in nix/card-shell/adapter.c:

Verification

This was done on the board with injected touch, build 7w2fpx1f…, test-activated 2026-10-29 00:50 CDT:

Limits: