summaryrefslogtreecommitdiff
path: root/src/udev-seat.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2014-02-10 11:40:55 +1000
committerJonas Ådahl <jadahl@gmail.com>2014-02-10 22:28:46 +0100
commitb34139c9e7c76b8da7fbfffad4647d700d68ff94 (patch)
tree1e504c2a334a8638b5dd3171bee9cbfd2a3eb3c6 /src/udev-seat.c
parent26a1fff7873101e2a2227e913ab29337605f6f5e (diff)
Make it possible to have persistent libinput_seat instances
With this patch, a user can keep a reference to a libinput_seat instance, which will cause the seat to never be unlinked from the libinput context nor destroyed. Previously, a when the last device of a seat was removed, the seat was unlinked and if a new device was discovered with a previously empty seat a new seat instance would always be created, meaning two potential seat instances with identical physical and logical seat name pairs. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/udev-seat.c')
-rw-r--r--src/udev-seat.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/udev-seat.c b/src/udev-seat.c
index 9b807bee..e622de2d 100644
--- a/src/udev-seat.c
+++ b/src/udev-seat.c
@@ -203,14 +203,6 @@ udev_input_remove_devices(struct udev_input *input)
list_for_each_safe(device, next,
&seat->base.devices_list, base.link) {
evdev_device_remove(device);
- if (list_empty(&seat->base.devices_list)) {
- /* if the seat may be referenced by the
- client, so make sure it's dropped from
- the seat list now, to be freed whenever
- * the device is removed */
- list_remove(&seat->base.link);
- list_init(&seat->base.link);
- }
}
libinput_seat_unref(&seat->base);
}
@@ -311,7 +303,6 @@ udev_seat_create(struct udev_input *input,
libinput_seat_init(&seat->base, &input->base,
device_seat, seat_name,
udev_seat_destroy);
- list_insert(&input->base.seat_list, &seat->base.link);
return seat;
}