mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-04 13:29:51 -05:00
wayland-server: Add destroy signal to wl_seat
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
parent
f36f32a0e0
commit
1432bd62df
2 changed files with 5 additions and 0 deletions
|
|
@ -622,6 +622,8 @@ wl_seat_init(struct wl_seat *seat)
|
||||||
{
|
{
|
||||||
memset(seat, 0, sizeof *seat);
|
memset(seat, 0, sizeof *seat);
|
||||||
|
|
||||||
|
wl_signal_init(&seat->destroy_signal);
|
||||||
|
|
||||||
seat->selection_data_source = NULL;
|
seat->selection_data_source = NULL;
|
||||||
wl_list_init(&seat->base_resource_list);
|
wl_list_init(&seat->base_resource_list);
|
||||||
wl_signal_init(&seat->selection_signal);
|
wl_signal_init(&seat->selection_signal);
|
||||||
|
|
@ -632,6 +634,8 @@ wl_seat_init(struct wl_seat *seat)
|
||||||
WL_EXPORT void
|
WL_EXPORT void
|
||||||
wl_seat_release(struct wl_seat *seat)
|
wl_seat_release(struct wl_seat *seat)
|
||||||
{
|
{
|
||||||
|
wl_signal_emit(&seat->destroy_signal, seat);
|
||||||
|
|
||||||
if (seat->pointer)
|
if (seat->pointer)
|
||||||
wl_pointer_release(seat->pointer);
|
wl_pointer_release(seat->pointer);
|
||||||
if (seat->keyboard)
|
if (seat->keyboard)
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,7 @@ struct wl_touch {
|
||||||
|
|
||||||
struct wl_seat {
|
struct wl_seat {
|
||||||
struct wl_list base_resource_list;
|
struct wl_list base_resource_list;
|
||||||
|
struct wl_signal destroy_signal;
|
||||||
|
|
||||||
struct wl_pointer *pointer;
|
struct wl_pointer *pointer;
|
||||||
struct wl_keyboard *keyboard;
|
struct wl_keyboard *keyboard;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue