backend/wayland: fix touch device not added on startup

We were firing the new_input signal on backend initialization,
before the compositor had the chance to add a listener for it.

Mimick what's done for wl_keyboard: if the backend hasn't been
started, delay wl_touch initialization.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3473
This commit is contained in:
Simon Ser 2022-08-11 09:09:37 +02:00
parent f244094682
commit 8c3c6987db
3 changed files with 10 additions and 2 deletions

View file

@ -424,6 +424,10 @@ static bool backend_start(struct wlr_backend *backend) {
init_seat_keyboard(seat);
}
if (seat->wl_touch) {
init_seat_touch(seat);
}
if (wl->tablet_manager) {
init_seat_tablet(seat);
}