diff --git a/tests/interactive/test-pixmap.c b/tests/interactive/test-pixmap.c index 9bdf95097..5a40cad8f 100644 --- a/tests/interactive/test-pixmap.c +++ b/tests/interactive/test-pixmap.c @@ -1,24 +1,23 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include +#include + +#ifdef CAIRO_HAS_XLIB_SURFACE +#include +#endif + #undef CLUTTER_DISABLE_DEPRECATED #include #ifdef CLUTTER_WINDOWING_X11 +#include +#include -# include -# include - -# include -# include - -# include -# include +#include +#include +#endif #define IMAGE TESTS_DATADIR G_DIR_SEPARATOR_S "redhand.png" @@ -127,6 +126,7 @@ stage_button_press_cb (ClutterActor *actor, gpointer data) { draw_arc ((Pixmap)data); + return FALSE; } @@ -172,9 +172,12 @@ create_pixmap (guint *width, guint *height, guint *depth) cairo_paint (cr); cairo_surface_destroy (image); - if (width) *width = w; - if (height) *height = h; - if (depth) *depth = 32; + if (width) + *width = w; + if (height) + *height = h; + if (depth) + *depth = 32; return pixmap; } @@ -210,6 +213,11 @@ test_pixmap_main (int argc, char **argv) if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) return 1; +#ifdef CLUTTER_WINDOWING_X11 + if (!clutter_check_windowing_backend (CLUTTER_WINDOWING_X11)) + g_error ("test-pixmap requires the X11 Clutter backend."); +#endif + xdpy = clutter_x11_get_default_display (); XSynchronize (xdpy, True); @@ -308,13 +316,3 @@ test_pixmap_main (int argc, char **argv) return EXIT_SUCCESS; } - -#else - -int -test_pixmap_main (int argc, char **argv) -{ - return EXIT_SUCCESS; -}; - -#endif /* CLUTTER_WINDOWING_X11 */