mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-22 06:47:12 -04:00
cursor: expose a wlr_touch device
Instead of copy-pasting all wlr_touch events, expose a wlr_touch device which emits the union of all aggregated touch devices. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3398
This commit is contained in:
parent
4f5d6e4746
commit
d74a40a320
3 changed files with 21 additions and 23 deletions
|
|
@ -363,16 +363,16 @@ int main(int argc, char *argv[]) {
|
|||
state.cursor_axis.notify = handle_cursor_axis;
|
||||
|
||||
// touch events
|
||||
wl_signal_add(&state.cursor->events.touch_up, &state.touch_up);
|
||||
wl_signal_add(&state.cursor->touch.events.up, &state.touch_up);
|
||||
state.touch_up.notify = handle_touch_up;
|
||||
|
||||
wl_signal_add(&state.cursor->events.touch_down, &state.touch_down);
|
||||
wl_signal_add(&state.cursor->touch.events.down, &state.touch_down);
|
||||
state.touch_down.notify = handle_touch_down;
|
||||
|
||||
wl_signal_add(&state.cursor->events.touch_motion, &state.touch_motion);
|
||||
wl_signal_add(&state.cursor->touch.events.motion, &state.touch_motion);
|
||||
state.touch_motion.notify = handle_touch_motion;
|
||||
|
||||
wl_signal_add(&state.cursor->events.touch_cancel, &state.touch_cancel);
|
||||
wl_signal_add(&state.cursor->touch.events.cancel, &state.touch_cancel);
|
||||
state.touch_cancel.notify = handle_touch_cancel;
|
||||
|
||||
wl_signal_add(&wlr->events.new_input, &state.new_input);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue