tests: Store the pointer event serial

Store the pointer serial for events that provide one, so that it can be
used by tests to send requests that require it (e.g., setting the cursor
surface).

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
dev
Alexandros Frantzis 3 years ago
parent 28d66344a0
commit 4ea9be5193
  1. 3
      tests/weston-test-client-helper.c
  2. 1
      tests/weston-test-client-helper.h

@ -130,6 +130,7 @@ pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
else
pointer->focus = NULL;
pointer->serial = serial;
pointer->x = wl_fixed_to_int(x);
pointer->y = wl_fixed_to_int(y);
@ -143,6 +144,7 @@ pointer_handle_leave(void *data, struct wl_pointer *wl_pointer,
{
struct pointer *pointer = data;
pointer->serial = serial;
pointer->focus = NULL;
testlog("test-client: got pointer leave, surface %p\n",
@ -172,6 +174,7 @@ pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
{
struct pointer *pointer = data;
pointer->serial = serial;
pointer->button = button;
pointer->state = state;
pointer->button_time_msec = time_msec;

@ -99,6 +99,7 @@ struct input {
struct pointer {
struct wl_pointer *wl_pointer;
struct surface *focus;
uint32_t serial;
int x;
int y;
uint32_t button;

Loading…
Cancel
Save