summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-02-25 17:04:47 -0500
committerKristian Høgsberg <krh@bitplanet.net>2013-02-28 14:57:01 -0500
commit068b61c25488cb55c686142886d988f3d6554ec0 (patch)
treeb0446e73ee466e2b58e35fd4f3e694c7f623b9c0 /tests
parente2464fd414c3ad2d7b7c3d711ad5886c24f36a37 (diff)
compositor: Change notify_motion to take relative motion events
Diffstat (limited to 'tests')
-rw-r--r--tests/weston-test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/weston-test.c b/tests/weston-test.c
index 08833e0a..b29b64fd 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -122,10 +122,13 @@ move_pointer(struct wl_client *client, struct wl_resource *resource,
{
struct weston_test *test = resource->data;
struct weston_seat *seat = get_seat(test);
+ struct wl_pointer *pointer = seat->seat.pointer;
test->compositor->focus = 1;
- notify_motion(seat, 100, wl_fixed_from_int(x), wl_fixed_from_int(y));
+ notify_motion(seat, 100,
+ wl_fixed_from_int(x) - pointer->x,
+ wl_fixed_from_int(y) - pointer->y);
notify_pointer_position(test, resource);
}