diff --git a/tests/conform/test-conform-common.c b/tests/conform/test-conform-common.c index d64c72f74..8ff8d0d6f 100644 --- a/tests/conform/test-conform-common.c +++ b/tests/conform/test-conform-common.c @@ -1,5 +1,10 @@ #include +#ifdef COGL_HAS_XLIB +#include +#include +#endif + #include "test-conform-common.h" /** @@ -21,6 +26,18 @@ test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture, "If you want to run all the tests you should run\n" "$ make test-report"); counter++; + +#ifdef COGL_HAS_XLIB + /* A lot of the tests depend on a specific stage / framebuffer size + * when they read pixels back to verify the results of the test. + * + * Normally the asynchronous nature of X means that setting the + * clutter stage size may really happen an indefinite amount of time + * later but since the tests are so short lived and may only render + * a single frame this is not an acceptable semantic. + */ + XSynchronize (clutter_x11_get_default_display(), TRUE); +#endif }