summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGiulio Camuffo <giuliocamuffo@gmail.com>2013-02-28 18:44:54 +0100
committerKristian Høgsberg <krh@bitplanet.net>2013-03-04 12:28:42 -0500
commit82cb505287a324468b697b76825332db02727854 (patch)
treea2103e9bc81f6d073d0e9aa8bd6dad8a770fedbe /tests
parent068b61c25488cb55c686142886d988f3d6554ec0 (diff)
tests: attach the surface's buffer when moving it
move_client() needs to attach the buffer, even if it was attached already, because since 184df50 configure() will be called only on newly attached surfaces, but the one that sets the test surface position is the configure function.
Diffstat (limited to 'tests')
-rw-r--r--tests/weston-test-client-helper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
index 1234c629..264dc0d5 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -84,6 +84,10 @@ move_client(struct client *client, int x, int y)
client->surface->y = y;
wl_test_move_surface(client->test->wl_test, surface->wl_surface,
surface->x, surface->y);
+ /* The attach here is necessary because commit() will call congfigure
+ * only on surfaces newly attached, and the one that sets the surface
+ * position is the configure. */
+ wl_surface_attach(surface->wl_surface, surface->wl_buffer, 0, 0);
wl_surface_damage(surface->wl_surface, 0, 0, surface->width,
surface->height);
@@ -516,7 +520,6 @@ client_create(int x, int y, int width, int height)
&surface->data);
memset(surface->data, 64, width * height * 4);
- wl_surface_attach(surface->wl_surface, surface->wl_buffer, 0, 0);
move_client(client, x, y);