aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykola Orliuk <virkony@gmail.com>2020-10-04 22:45:36 +0200
committerSimon Ser <contact@emersion.fr>2020-11-12 12:31:32 +0100
commit44c4773d58e8d671e3f3e60d7eda86134775e9c9 (patch)
tree083b10e8c5e9602c25a5f27e41a8c824da08e6c4
parent70ffda3ea313caace95ad61d647ffb7367af1ae5 (diff)
backend/wayland: Use seat name in input names
-rw-r--r--backend/wayland/seat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/wayland/seat.c b/backend/wayland/seat.c
index ebb9c84c..d61e1370 100644
--- a/backend/wayland/seat.c
+++ b/backend/wayland/seat.c
@@ -448,7 +448,11 @@ struct wlr_wl_input_device *create_wl_input_device(
struct wlr_input_device *wlr_dev = &dev->wlr_input_device;
unsigned int vendor = 0, product = 0;
- const char *name = "wayland";
+
+ size_t name_size = 8 + strlen(seat->name) + 1;
+ char name[name_size];
+ (void) snprintf(name, name_size, "wayland-%s", seat->name);
+
wlr_input_device_init(wlr_dev, type, &input_device_impl, name, vendor,
product);
wl_list_insert(&seat->backend->devices, &wlr_dev->link);