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:
Simon Ser 2022-05-27 18:12:38 +02:00
parent 4f5d6e4746
commit d74a40a320
3 changed files with 21 additions and 23 deletions

View file

@ -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);