wayland-server: Add destroy signal to wl_seat

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
Jonas Ådahl 2012-06-12 23:57:33 +02:00 committed by Kristian Høgsberg
parent f36f32a0e0
commit 1432bd62df
2 changed files with 5 additions and 0 deletions

View file

@ -622,6 +622,8 @@ wl_seat_init(struct wl_seat *seat)
{
memset(seat, 0, sizeof *seat);
wl_signal_init(&seat->destroy_signal);
seat->selection_data_source = NULL;
wl_list_init(&seat->base_resource_list);
wl_signal_init(&seat->selection_signal);
@ -632,6 +634,8 @@ wl_seat_init(struct wl_seat *seat)
WL_EXPORT void
wl_seat_release(struct wl_seat *seat)
{
wl_signal_emit(&seat->destroy_signal, seat);
if (seat->pointer)
wl_pointer_release(seat->pointer);
if (seat->keyboard)

View file

@ -294,6 +294,7 @@ struct wl_touch {
struct wl_seat {
struct wl_list base_resource_list;
struct wl_signal destroy_signal;
struct wl_pointer *pointer;
struct wl_keyboard *keyboard;