[PATCH weston 15/31] Use compositor->seat_list instead of a singular seat
Daniel Stone
daniel at fooishbar.org
Wed May 30 08:31:53 PDT 2012
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
src/compositor.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 0e3e9ac..ffbdf96 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -658,20 +658,22 @@ weston_compositor_repick(struct weston_compositor *compositor)
static void
weston_surface_unmap(struct weston_surface *surface)
{
- struct wl_seat *seat = &surface->compositor->seat->seat;
+ struct weston_seat *seat;
weston_surface_damage_below(surface);
surface->output = NULL;
wl_list_remove(&surface->link);
wl_list_remove(&surface->layer_link);
- if (seat->keyboard->focus == &surface->surface)
- wl_keyboard_set_focus(seat->keyboard, NULL);
- if (seat->pointer->focus == &surface->surface)
- wl_pointer_set_focus(seat->pointer,
- NULL,
- wl_fixed_from_int(0),
- wl_fixed_from_int(0));
+ wl_list_for_each(seat, &surface->compositor->seat_list, link) {
+ if (seat->seat.keyboard->focus == &surface->surface)
+ wl_keyboard_set_focus(seat->seat.keyboard, NULL);
+ if (seat->seat.pointer->focus == &surface->surface)
+ wl_pointer_set_focus(seat->seat.pointer,
+ NULL,
+ wl_fixed_from_int(0),
+ wl_fixed_from_int(0));
+ }
weston_compositor_schedule_repaint(surface->compositor);
}
@@ -2444,7 +2446,10 @@ weston_seat_update_drag_surface(struct wl_seat *seat,
WL_EXPORT void
weston_compositor_update_drag_surfaces(struct weston_compositor *compositor)
{
- weston_seat_update_drag_surface(&compositor->seat->seat, 0, 0);
+ struct weston_seat *seat;
+
+ wl_list_for_each(seat, &compositor->seat_list, link)
+ weston_seat_update_drag_surface(&seat->seat, 0, 0);
}
static void
--
1.7.10
More information about the wayland-devel
mailing list