diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2016-07-22 17:52:58 +0800 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2016-07-26 17:21:15 +0800 |
commit | 3eb4ddd24d5e9fcf3cb7e0cdeeceefa6619fe8c0 (patch) | |
tree | 76e0837b68744df5ed3c4be51a7026ffc60a8deb /libweston | |
parent | f7deb6a9592cd2dff480b80f2887ceab8e6066cd (diff) |
weston-pointer: Add destroy signal
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'libweston')
-rw-r--r-- | libweston/compositor.h | 1 | ||||
-rw-r--r-- | libweston/input.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libweston/compositor.h b/libweston/compositor.h index 41777568..39f39c14 100644 --- a/libweston/compositor.h +++ b/libweston/compositor.h @@ -370,6 +370,7 @@ struct weston_pointer { struct wl_listener focus_resource_listener; struct wl_signal focus_signal; struct wl_signal motion_signal; + struct wl_signal destroy_signal; struct weston_view *sprite; struct wl_listener sprite_destroy_listener; diff --git a/libweston/input.c b/libweston/input.c index c733bbc0..b559656e 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -796,6 +796,7 @@ weston_pointer_create(struct weston_seat *seat) wl_signal_init(&pointer->motion_signal); wl_signal_init(&pointer->focus_signal); wl_list_init(&pointer->focus_view_listener.link); + wl_signal_init(&pointer->destroy_signal); pointer->sprite_destroy_listener.notify = pointer_handle_sprite_destroy; @@ -817,6 +818,8 @@ weston_pointer_create(struct weston_seat *seat) WL_EXPORT void weston_pointer_destroy(struct weston_pointer *pointer) { + wl_signal_emit(&pointer->destroy_signal, pointer); + if (pointer->sprite) pointer_unmap_sprite(pointer); |