udev: notify about a removed seat when the last device is removed
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 23 Dec 2013 04:16:03 +0000 (14:16 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 10 Jan 2014 01:08:24 +0000 (11:08 +1000)
commit93fbb5e05f184de84c6e4b0b11a9dc8303a11f23
tree52c8975bbb88f56ccd1f941555b8e1b60bbb6fce
parent6fcaf7699c3b5ee1bc0a8199044a8989b2c6145f
udev: notify about a removed seat when the last device is removed

When the last device is removed from a seat, destroy the seat.
This guarantees seat removal events on libinput_suspend() as well.

Note that the seat must be manually unlinked, we can't rely on the unlinking
in libinput_seat_destroy. After the event, the seat's refcount is always > 1,
so the seat will live on until the event is destroyed. We need to make sure
it's not in the list anymore though.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/udev-seat.c