types/wlr_input_device: move output_name field to wlr_pointer and wlr_touch

This commit is contained in:
Simon Zeni 2022-03-08 16:45:03 -05:00
parent 2001441a37
commit a92e5f8d46
9 changed files with 18 additions and 6 deletions

View file

@ -217,6 +217,13 @@ static void init_seat_touch(struct wlr_wl_seat *seat) {
wlr_touch_init(&seat->wlr_touch, &touch_impl, name);
struct wlr_wl_output *output;
wl_list_for_each(output, &seat->backend->outputs, link) {
/* Multi-output touch not supproted */
seat->wlr_touch.output_name = strdup(output->wlr_output.name);
break;
}
wl_touch_add_listener(seat->wl_touch, &touch_listener, seat);
wlr_signal_emit_safe(&seat->backend->backend.events.new_input,
&seat->wlr_touch.base);