fix(input): stop dividing touch/tablet bridge coords by output scale (#47) #93
No reviewers
Labels
No labels
bug
duplicate
enhancement
future
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
albert/shepherd-launcher!93
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "u/albert/47/touch-compat-scale-offset"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The absolute pointer/touchscreen the input bridges synthesize declares a
0..=65535 range that libinput maps onto the output's logical layout
space, so a full-pad sweep already tracks the finger 1:1 at any output
scale. The output-scale division added in #58 was therefore wrong in
principle; it only ever looked correct because it was solely exercised
with the XWayland HiDPI workaround forcing scale to 1.0, where the divide
is a no-op. On a scaled output without that workaround (Scratch at output
scale 1.5) it offset the synthesized cursor — issue #47.
Remove the correction from both bridges: rescale_abs no longer takes a
scale, new_absolute()/new_touchscreen() drop the output_scale parameter,
the --output-scale CLI flag is gone from the touch and tablet bridges,
and the host no longer queries the sway scale or passes it through.
Confirmed 1:1 end-to-end against the live Scratch repro (edge-to-edge
drag plus corner/center taps). The tablet bridge fix has no live repro
(no tablet on hand) but follows the same reasoning and needs re-testing
on real hardware.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01MYSRycxV3iG9PHjHqArLjg
Fixes #47 (for real this time, validated with the XWayland hack both on and off)