[PATCH libinput] Note that libinput_unref() really destroys everything

Andreas Pokorny andreas.pokorny at gmail.com
Thu Sep 3 23:29:07 PDT 2015


Hi,
To some degree this does not sound like a bug. At least for resources that
are not presented to the user as being ref counted. But I would have
expected that libinput_path_add_device would increase the ref count of the
libinput_context and similar for seats. So as long as the device is not
unref-ed to zero it would keep the context alive.

Additionally..

2015-09-04 6:17 GMT+02:00 Peter Hutterer <peter.hutterer at who-t.net>:

> + * [...]
> + * @code
> + * li = libinput_path_create_context(&interface, NULL);
> + * device = libinput_path_add_device(li, "/dev/input/event0");
> + * // get extra reference to device
> + * libinput_device_ref(device);
>

why is libinput_path_add_device not creating a device with a ref count of
1, just like the init function of the libinput context?
The current behavior looks inconsistent. Although that behavior does not
cause trouble if the user sticks to a shut down sequence that unrefs
devices first...

regards
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150904/4d0cfeb9/attachment-0001.html>


More information about the wayland-devel mailing list