[clutter/clutter-1.12] test: Only run X11-specific code when using X11
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.12] test: Only run X11-specific code when using X11
- Date: Wed, 17 Oct 2012 08:58:51 +0000 (UTC)
commit 18364e5ec9d86f585b7ba22889606c44b2800fcb
Author: Daniel Stone <daniel fooishbar org>
Date: Tue Sep 18 10:31:01 2012 +1000
test: Only run X11-specific code when using X11
The X11-specific windowing checks were hidden behind an #ifdef, however
if the tests were run under Wayland, they would execute uncondionally
and cause assertion failures. Fix this by also hiding them behind a
check that the current backend is indeed X11.
Signed-off-by: Daniel Stone <daniel fooishbar org>
(cherry picked from commit 13d889814c410ed7f0ead8e9fac4b6086b9f2f8e)
Signed-off-by: Emmanuele Bassi <ebassi gnome org>
tests/conform/test-conform-common.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/tests/conform/test-conform-common.c b/tests/conform/test-conform-common.c
index 09474bc..4d400e3 100644
--- a/tests/conform/test-conform-common.c
+++ b/tests/conform/test-conform-common.c
@@ -42,10 +42,10 @@ test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture,
exit (EXIT_SUCCESS);
}
- }
- /* enable XInput support */
- clutter_x11_enable_xinput ();
+ /* enable XInput support */
+ clutter_x11_enable_xinput ();
+ }
#endif
g_assert (clutter_init (shared_state->argc_addr, shared_state->argv_addr)
@@ -60,7 +60,8 @@ test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture,
* 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);
+ if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
+ XSynchronize (clutter_x11_get_default_display(), TRUE);
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]