input: Use new wl_resource_for_each for sending updated seat caps
This commit is contained in:
committed by
Kristian Høgsberg
parent
a62ef3e0b6
commit
6e737f590b
+3
-4
@@ -398,8 +398,8 @@ weston_touch_destroy(struct weston_touch *touch)
|
|||||||
static void
|
static void
|
||||||
seat_send_updated_caps(struct weston_seat *seat)
|
seat_send_updated_caps(struct weston_seat *seat)
|
||||||
{
|
{
|
||||||
struct wl_list *link;
|
|
||||||
enum wl_seat_capability caps = 0;
|
enum wl_seat_capability caps = 0;
|
||||||
|
struct wl_resource *resource;
|
||||||
|
|
||||||
if (seat->pointer)
|
if (seat->pointer)
|
||||||
caps |= WL_SEAT_CAPABILITY_POINTER;
|
caps |= WL_SEAT_CAPABILITY_POINTER;
|
||||||
@@ -408,9 +408,8 @@ seat_send_updated_caps(struct weston_seat *seat)
|
|||||||
if (seat->touch)
|
if (seat->touch)
|
||||||
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||||
|
|
||||||
for (link = seat->base_resource_list.next;
|
wl_resource_for_each(resource, &seat->base_resource_list) {
|
||||||
link != &seat->base_resource_list; link = link->next) {
|
wl_seat_send_capabilities(resource, caps);
|
||||||
wl_seat_send_capabilities(wl_resource_from_link(link), caps);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user