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

+19 -1
View File
@@ -57,7 +57,7 @@ extern "C" fn rs_present_kms() = "rs_present_kms"
///| The seat, DRM and input fds while the display is open (none otherwise), for an idle wait.
fn display_wait_fds() -> Array[Int] {
let out : Array[Int] = []
for i in 0..<4 {
for i in 0..<3 {
let fd = mp_kms_fd(i)
if fd >= 0 {
out.push(fd)
@@ -116,6 +116,24 @@ fn take_input() -> Array[@wt.Val] {
),
),
)
6 => {
let point = fn() -> @wt.Val? {
Some(
Record([
("id", S32(b)),
("x", F64(mp_kms_arg(3).to_double() / 256.0)),
("y", F64(mp_kms_arg(4).to_double() / 256.0)),
]),
)
}
match a {
0 => out.push(Variant("touch-down", point()))
1 => out.push(Variant("touch-motion", point()))
2 => out.push(Variant("touch-up", Some(S32(b))))
3 => out.push(Variant("touch-cancel", None))
_ => out.push(Variant("touch-present", None))
}
}
_ => ()
}
}