Touch: fingers reach apps as wl_touch, so a thumb scrolls
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:
1 parent
98a99aaa36
commit
e30d9cc71f
17 files changed
+786
-126
No files matched your search
@@ -39,12 +39,21 @@ interface display {
|
||||
/// Wheel/touchpad scroll: axis (0 vertical, 1 horizontal), distance in pixels (positive =
|
||||
/// down/right), wheel notches (0 when not from a wheel).
|
||||
record scroll-delta { axis: u32, value: f64, discrete: s32 }
|
||||
/// A finger on the touchscreen, by id (reused once it is up), in output pixels.
|
||||
record touch-point { id: s32, x: f64, y: f64 }
|
||||
variant seat-event {
|
||||
pointer-move(pointer-pos),
|
||||
pointer-button(key-state),
|
||||
key(key-state),
|
||||
modifiers(modifiers),
|
||||
scroll(scroll-delta),
|
||||
touch-down(touch-point),
|
||||
touch-motion(touch-point),
|
||||
touch-up(s32),
|
||||
/// Every finger's touch is over, without a tap.
|
||||
touch-cancel,
|
||||
/// The seat has a touchscreen.
|
||||
touch-present,
|
||||
}
|
||||
/// Input queued since the last call.
|
||||
take-input: func() -> list<seat-event>;
|
||||
|
||||
Reference in new issue
Block a user