summaryrefslogtreecommitdiff
path: root/tests/event-test.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-05-16 18:45:18 +0100
committerKristian Høgsberg <krh@bitplanet.net>2012-05-16 15:29:06 -0400
commit37816df64641a9b8bb922e938f902adc2374de2e (patch)
treeca57380d1aeb7c9f13b4bd4cd743e8869d2db1a7 /tests/event-test.c
parentdc549932b734967b6ea7bb9a9d3467440e105739 (diff)
Convert wl_input_device to wl_seat (and friends)
wl_input_device has been both renamed and split. wl_seat is now a virtual object representing a group of logically related input devices with related focus. It now only generates one event: to let clients know that it has new capabilities. It takes requests which hand back objects for the wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all provide the old input interface, just under different names. This commit tracks these changes in weston and the clients, as well as similar renames (e.g. weston_input_device -> weston_seat). Some other changes were necessary, e.g. renaming the name for the visible mouse sprite from 'pointer' to 'cursor' so as to not conflict. For simplicity, every seat is always exposed with all three interfaces, although this will change as time goes on. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'tests/event-test.c')
-rw-r--r--tests/event-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/event-test.c b/tests/event-test.c
index e89d5aa4..68926e5d 100644
--- a/tests/event-test.c
+++ b/tests/event-test.c
@@ -37,7 +37,7 @@ handle_surface(struct test_client *client)
struct wl_resource *resource;
struct weston_surface *surface;
struct weston_layer *layer = client->data;
- struct wl_input_device *device;
+ struct wl_seat *seat;
assert(sscanf(client->buf, "surface %u", &id) == 1);
fprintf(stderr, "got surface id %u\n", id);
@@ -53,10 +53,10 @@ handle_surface(struct test_client *client)
wl_list_insert(&layer->surface_list, &surface->layer_link);
weston_surface_damage(surface);
- device = client->compositor->input_device;
+ seat = &client->compositor->seat->seat;
client->compositor->focus = 1; /* Make it work even if pointer is
* outside X window. */
- notify_motion(device, 100,
+ notify_motion(seat, 100,
wl_fixed_from_int(150), wl_fixed_from_int(150));
test_client_send(client, "bye\n");