aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/wayland/backend.c4
-rw-r--r--backend/wayland/seat.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
index 07df6912..2980324f 100644
--- a/backend/wayland/backend.c
+++ b/backend/wayland/backend.c
@@ -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);
}
diff --git a/backend/wayland/seat.c b/backend/wayland/seat.c
index d1c75b39..655f9dad 100644
--- a/backend/wayland/seat.c
+++ b/backend/wayland/seat.c
@@ -212,7 +212,7 @@ static const struct wlr_touch_impl touch_impl = {
.name = "wl-touch",
};
-static void init_seat_touch(struct wlr_wl_seat *seat) {
+void init_seat_touch(struct wlr_wl_seat *seat) {
assert(seat->wl_touch);
char name[128] = {0};
@@ -333,7 +333,9 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
wlr_log(WLR_DEBUG, "seat '%s' offering touch", seat->name);
seat->wl_touch = wl_seat_get_touch(wl_seat);
- init_seat_touch(seat);
+ if (backend->started) {
+ init_seat_touch(seat);
+ }
}
if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && seat->wl_touch != NULL) {
wlr_log(WLR_DEBUG, "seat '%s' dropping touch", seat->name);