summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2013-09-06 17:48:19 +0100
committerKristian Høgsberg <krh@bitplanet.net>2013-09-11 11:57:28 -0700
commit6e737f590bfad4ff8470a94df80690bcdc87c7cc (patch)
treeefeafa16211ff2db64d2fc08bd4fba4847b286a3
parenta62ef3e0b6a39b31c0a9677ce1257f9c4bfaa337 (diff)
input: Use new wl_resource_for_each for sending updated seat caps
-rw-r--r--src/input.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input.c b/src/input.c
index 78b6eadb..9c30460a 100644
--- a/src/input.c
+++ b/src/input.c
@@ -398,8 +398,8 @@ weston_touch_destroy(struct weston_touch *touch)
static void
seat_send_updated_caps(struct weston_seat *seat)
{
- struct wl_list *link;
enum wl_seat_capability caps = 0;
+ struct wl_resource *resource;
if (seat->pointer)
caps |= WL_SEAT_CAPABILITY_POINTER;
@@ -408,9 +408,8 @@ seat_send_updated_caps(struct weston_seat *seat)
if (seat->touch)
caps |= WL_SEAT_CAPABILITY_TOUCH;
- for (link = seat->base_resource_list.next;
- link != &seat->base_resource_list; link = link->next) {
- wl_seat_send_capabilities(wl_resource_from_link(link), caps);
+ wl_resource_for_each(resource, &seat->base_resource_list) {
+ wl_seat_send_capabilities(resource, caps);
}
}