• Home
  • Raw
  • Download

Lines Matching full:client

33 #include "weston-test-client-helper.h"
53 send_motion(struct client *client, const struct timespec *time, int x, int y) in send_motion() argument
58 weston_test_move_pointer(client->test->weston_test, tv_sec_hi, tv_sec_lo, in send_motion()
60 client_roundtrip(client); in send_motion()
64 send_button(struct client *client, const struct timespec *time, in send_button() argument
70 weston_test_send_button(client->test->weston_test, tv_sec_hi, tv_sec_lo, in send_button()
72 client_roundtrip(client); in send_button()
76 send_axis(struct client *client, const struct timespec *time, uint32_t axis, in send_axis() argument
82 weston_test_send_axis(client->test->weston_test, tv_sec_hi, tv_sec_lo, in send_axis()
84 client_roundtrip(client); in send_axis()
88 check_pointer(struct client *client, int x, int y) in check_pointer() argument
92 /* check that the client got the global pointer update */ in check_pointer()
93 assert(client->test->pointer_x == x); in check_pointer()
94 assert(client->test->pointer_y == y); in check_pointer()
97 if (surface_contains(client->surface, x, y)) { in check_pointer()
99 assert(client->input->pointer->focus == client->surface); in check_pointer()
105 sx = client->input->pointer->x + client->surface->x; in check_pointer()
106 sy = client->input->pointer->y + client->surface->y; in check_pointer()
114 assert(client->input->pointer->focus == NULL); in check_pointer()
119 check_pointer_move(struct client *client, int x, int y) in check_pointer_move() argument
121 send_motion(client, &t0, x, y); in check_pointer_move()
122 check_pointer(client, x, y); in check_pointer_move()
125 static struct client *
128 struct client *cl = create_client_and_test_surface(x, y, w, h); in create_client_with_pointer_focus()
138 struct client *client; in TEST() local
141 client = create_client_and_test_surface(46, 76, 111, 134); in TEST()
142 assert(client); in TEST()
145 x = client->surface->x - 1; in TEST()
146 y = client->surface->y - 1; in TEST()
147 assert(!surface_contains(client->surface, x, y)); in TEST()
148 check_pointer_move(client, x, y); in TEST()
152 assert(surface_contains(client->surface, x, y)); in TEST()
153 check_pointer_move(client, x, y); in TEST()
157 assert(!surface_contains(client->surface, x, y)); in TEST()
158 check_pointer_move(client, x, y); in TEST()
163 struct client *client; in TEST() local
166 client = create_client_and_test_surface(99, 100, 100, 98); in TEST()
167 assert(client); in TEST()
170 x = client->surface->x - 1; in TEST()
171 y = client->surface->y + client->surface->height; in TEST()
172 assert(!surface_contains(client->surface, x, y)); in TEST()
173 check_pointer_move(client, x, y); in TEST()
177 assert(surface_contains(client->surface, x, y)); in TEST()
178 check_pointer_move(client, x, y); in TEST()
182 assert(!surface_contains(client->surface, x, y)); in TEST()
183 check_pointer_move(client, x, y); in TEST()
188 struct client *client; in TEST() local
191 client = create_client_and_test_surface(48, 100, 67, 100); in TEST()
192 assert(client); in TEST()
195 x = client->surface->x + client->surface->width; in TEST()
196 y = client->surface->y - 1; in TEST()
197 assert(!surface_contains(client->surface, x, y)); in TEST()
198 check_pointer_move(client, x, y); in TEST()
202 assert(surface_contains(client->surface, x, y)); in TEST()
203 check_pointer_move(client, x, y); in TEST()
207 assert(!surface_contains(client->surface, x, y)); in TEST()
208 check_pointer_move(client, x, y); in TEST()
213 struct client *client; in TEST() local
216 client = create_client_and_test_surface(100, 123, 100, 69); in TEST()
217 assert(client); in TEST()
220 x = client->surface->x + client->surface->width; in TEST()
221 y = client->surface->y + client->surface->height; in TEST()
222 assert(!surface_contains(client->surface, x, y)); in TEST()
223 check_pointer_move(client, x, y); in TEST()
227 assert(surface_contains(client->surface, x, y)); in TEST()
228 check_pointer_move(client, x, y); in TEST()
232 assert(!surface_contains(client->surface, x, y)); in TEST()
233 check_pointer_move(client, x, y); in TEST()
238 struct client *client; in TEST() local
241 client = create_client_and_test_surface(100, 201, 100, 50); in TEST()
242 assert(client); in TEST()
245 x = client->surface->x + client->surface->width/2; in TEST()
246 y = client->surface->y - 1; in TEST()
247 assert(!surface_contains(client->surface, x, y)); in TEST()
248 check_pointer_move(client, x, y); in TEST()
252 assert(surface_contains(client->surface, x, y)); in TEST()
253 check_pointer_move(client, x, y); in TEST()
257 assert(!surface_contains(client->surface, x, y)); in TEST()
258 check_pointer_move(client, x, y); in TEST()
263 struct client *client; in TEST() local
266 client = create_client_and_test_surface(100, 45, 67, 100); in TEST()
267 assert(client); in TEST()
270 x = client->surface->x + client->surface->width/2; in TEST()
271 y = client->surface->y + client->surface->height; in TEST()
272 assert(!surface_contains(client->surface, x, y)); in TEST()
273 check_pointer_move(client, x, y); in TEST()
277 assert(surface_contains(client->surface, x, y)); in TEST()
278 check_pointer_move(client, x, y); in TEST()
282 assert(!surface_contains(client->surface, x, y)); in TEST()
283 check_pointer_move(client, x, y); in TEST()
288 struct client *client; in TEST() local
291 client = create_client_and_test_surface(167, 45, 78, 100); in TEST()
292 assert(client); in TEST()
295 x = client->surface->x - 1; in TEST()
296 y = client->surface->y + client->surface->height/2; in TEST()
297 assert(!surface_contains(client->surface, x, y)); in TEST()
298 check_pointer_move(client, x, y); in TEST()
302 assert(surface_contains(client->surface, x, y)); in TEST()
303 check_pointer_move(client, x, y); in TEST()
307 assert(!surface_contains(client->surface, x, y)); in TEST()
308 check_pointer_move(client, x, y); in TEST()
313 struct client *client; in TEST() local
316 client = create_client_and_test_surface(110, 37, 100, 46); in TEST()
317 assert(client); in TEST()
320 x = client->surface->x + client->surface->width; in TEST()
321 y = client->surface->y + client->surface->height/2; in TEST()
322 assert(!surface_contains(client->surface, x, y)); in TEST()
323 check_pointer_move(client, x, y); in TEST()
327 assert(surface_contains(client->surface, x, y)); in TEST()
328 check_pointer_move(client, x, y); in TEST()
332 assert(!surface_contains(client->surface, x, y)); in TEST()
333 check_pointer_move(client, x, y); in TEST()
338 struct client *client; in TEST() local
340 client = create_client_and_test_surface(100, 100, 100, 100); in TEST()
341 assert(client); in TEST()
343 /* move pointer outside of client */ in TEST()
344 assert(!surface_contains(client->surface, 50, 50)); in TEST()
345 check_pointer_move(client, 50, 50); in TEST()
347 /* move client center to pointer */ in TEST()
348 move_client(client, 0, 0); in TEST()
349 assert(surface_contains(client->surface, 50, 50)); in TEST()
350 check_pointer(client, 50, 50); in TEST()
355 struct client *client = create_client_with_pointer_focus(100, 100, in TEST() local
357 struct pointer *pointer = client->input->pointer; in TEST()
359 input_timestamps_create_for_pointer(client); in TEST()
361 send_motion(client, &t1, 150, 150); in TEST()
372 struct client *client = create_client_with_pointer_focus(100, 100, in TEST() local
374 struct pointer *pointer = client->input->pointer; in TEST()
376 input_timestamps_create_for_pointer(client); in TEST()
381 send_button(client, &t1, BTN_LEFT, WL_POINTER_BUTTON_STATE_PRESSED); in TEST()
387 send_button(client, &t2, BTN_LEFT, WL_POINTER_BUTTON_STATE_RELEASED); in TEST()
398 struct client *client = create_client_with_pointer_focus(100, 100, in TEST() local
400 struct pointer *pointer = client->input->pointer; in TEST()
402 input_timestamps_create_for_pointer(client); in TEST()
404 send_axis(client, &t1, 1, 1.0); in TEST()
410 send_axis(client, &t2, 2, 0.0); in TEST()
420 struct client *client = create_client_with_pointer_focus(100, 100, in TEST() local
422 struct pointer *pointer = client->input->pointer; in TEST()
424 input_timestamps_create_for_pointer(client); in TEST()
426 send_button(client, &t1, BTN_LEFT, WL_POINTER_BUTTON_STATE_PRESSED); in TEST()
434 send_button(client, &t2, BTN_LEFT, WL_POINTER_BUTTON_STATE_RELEASED); in TEST()
443 struct client *client = create_client_with_pointer_focus(100, 100, in TEST() local
445 struct pointer *pointer = client->input->pointer; in TEST()
447 input_timestamps_create_for_pointer(client); in TEST()
449 send_motion(client, &t1, 150, 150); in TEST()
455 wl_pointer_release(client->input->pointer->wl_pointer); in TEST()
463 send_motion(client, &t2, 175, 175); in TEST()