Touch: fingers reach apps as wl_touch, so a thumb scrolls
Deploy to the handset / build-and-deploy (push) Successful in 2m20s
CI / test (push) Failing after 2m56s

Every touch was turned into a mouse drag in the seat code, which selects text
instead of scrolling. The seat now reports raw touches and the compositor
routes them: to the app as wl_touch on its own content, and to the pointer
(tap, drag, hold for right click, as before) everywhere else and for apps that
don't listen to touches. The cursor is hidden while fingers are in use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-29 22:22:14 -08:00
1 parent 98a99aaa36
commit e30d9cc71f
17 files changed
+786 -126

No files matched your search

+4 -1
View File
@@ -14,7 +14,10 @@ Chandra includes KMS/libinput/compositor adaptations tailored for mainline Linux
## Touch Input & On-Screen Keyboard
- **Long-press right-click:** In [`compositor/kms/kms_stub.c`](../compositor/kms/kms_stub.c), a stationary touch held for `500 ms` converts to a synthetic right-click (`BTN_RIGHT`) via a `timerfd`, allowing context menus and secondary actions without a mouse.
- **Touch goes to apps as touch (`wl_touch`):** a finger on an app's own content is the app's: it scrolls with a thumb, flings, pinches and long-presses as that app does ([`compositor/host/touch.mbt`](../compositor/host/touch.mbt)). The seat only says it has a touchscreen when libinput finds one. If the app answers a touch with a window move, resize or drag and drop, its touch is cancelled and the finger drags from there.
- **Elsewhere a finger is a mouse:** on the panel, the on-screen keyboard, the desktop, title bars, dialogs, and apps that don't listen to touches, a tap clicks, a drag is a left-button drag, and a stationary touch held for `500 ms` is a right click.
- **Cursor:** hidden while fingers are in use; moving a mouse shows it again.
- **Testing:** `chandra-ctl input-touch down ID X Y`, `motion ID X Y`, `up ID`, `cancel` act like the touchscreen.
- **Built-in OSK:** [`compositor/host/osk.mbt`](../compositor/host/osk.mbt) provides a 5-row virtual keyboard that opens automatically when Wayland text input (`zwp_text_input_v3`) gains focus and can also be toggled manually from the **`KB`** (`osk`) panel module. It sits directly above the panel, so the panel stays visible and usable while typing (a strict kiosk has no panel: there it reaches the bottom edge).
## Display Rotation, Flip, and Auto-Rotate