[PATCH weston v4 03/15] Add a signal for when a seat updates its capabilities

Jason Ekstrand jason at jlekstrand.net
Tue Feb 25 17:26:35 PST 2014


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/compositor.h | 1 +
 src/input.c      | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/compositor.h b/src/compositor.h
index 63e4e2c..7edf7b3 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -494,6 +494,7 @@ struct weston_seat {
 	struct weston_output *output; /* constraint */
 
 	struct wl_signal destroy_signal;
+	struct wl_signal updated_caps_signal;
 
 	struct weston_compositor *compositor;
 	struct wl_list link;
diff --git a/src/input.c b/src/input.c
index e20c870..6c89f11 100644
--- a/src/input.c
+++ b/src/input.c
@@ -602,6 +602,7 @@ seat_send_updated_caps(struct weston_seat *seat)
 	wl_resource_for_each(resource, &seat->base_resource_list) {
 		wl_seat_send_capabilities(resource, caps);
 	}
+	wl_signal_emit(&seat->updated_caps_signal, seat);
 }
 
 WL_EXPORT void
@@ -2197,6 +2198,7 @@ weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec,
 	wl_signal_init(&seat->selection_signal);
 	wl_list_init(&seat->drag_resource_list);
 	wl_signal_init(&seat->destroy_signal);
+	wl_signal_init(&seat->updated_caps_signal);
 
 	seat->global = wl_global_create(ec->wl_display, &wl_seat_interface, 3,
 					seat, bind_seat);
-- 
1.8.5.3



More information about the wayland-devel mailing list