mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-04 19:53:08 +00:00
tests: Don't wait for frame callbacks when a surface is on no outputs
The event-test moves a client off of all the outputs to check for an output leave event, but our move_client() code waits on a frame callback to continue. The fact that weston currently generates this frame callback is not something we should enforce in a test, as it could (should) change in the future. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
f0196739ae
commit
14220a5f80
|
@ -56,7 +56,7 @@ output_contains_client(struct client *client)
|
|||
static void
|
||||
check_client_move(struct client *client, int x, int y)
|
||||
{
|
||||
move_client(client, x, y);
|
||||
move_client_offscreenable(client, x, y);
|
||||
|
||||
if (output_contains_client(client)) {
|
||||
assert(client->surface->output == client->output);
|
||||
|
|
|
@ -99,11 +99,10 @@ frame_callback_wait_nofail(struct client *client, int *done)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
move_client(struct client *client, int x, int y)
|
||||
static void
|
||||
move_client_internal(struct client *client, int x, int y)
|
||||
{
|
||||
struct surface *surface = client->surface;
|
||||
int done;
|
||||
|
||||
client->surface->x = x;
|
||||
client->surface->y = y;
|
||||
|
@ -116,13 +115,30 @@ move_client(struct client *client, int x, int y)
|
|||
wl_surface_damage(surface->wl_surface, 0, 0, surface->width,
|
||||
surface->height);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
move_client(struct client *client, int x, int y)
|
||||
{
|
||||
struct surface *surface = client->surface;
|
||||
int done;
|
||||
|
||||
move_client_internal(client, x, y);
|
||||
frame_callback_set(surface->wl_surface, &done);
|
||||
|
||||
wl_surface_commit(surface->wl_surface);
|
||||
|
||||
frame_callback_wait(client, &done);
|
||||
}
|
||||
|
||||
void
|
||||
move_client_offscreenable(struct client *client, int x, int y)
|
||||
{
|
||||
struct surface *surface = client->surface;
|
||||
|
||||
move_client_internal(client, x, y);
|
||||
wl_surface_commit(surface->wl_surface);
|
||||
wl_display_roundtrip(client->wl_display);
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
|
||||
uint32_t serial, struct wl_surface *wl_surface,
|
||||
|
|
|
@ -229,6 +229,9 @@ surface_contains(struct surface *surface, int x, int y);
|
|||
void
|
||||
move_client(struct client *client, int x, int y);
|
||||
|
||||
void
|
||||
move_client_offscreenable(struct client *client, int x, int y);
|
||||
|
||||
#define client_roundtrip(c) do { \
|
||||
assert(wl_display_roundtrip((c)->wl_display) >= 0); \
|
||||
} while (0)
|
||||
|
|
Loading…
Reference in a new issue