diff options
author | Brad King <brad.king@kitware.com> | 2022-03-11 13:50:01 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-03-11 13:50:07 (GMT) |
commit | 34c25f64513772215c0b2cd3e6c145226a5024dc (patch) | |
tree | 3ccefa2727b9f7a87c0583972b9e6531731cbc8c /Tests | |
parent | 67f23f5f4ed298457b0bc2a9611761096fec7342 (diff) | |
parent | ce28748ced4ed6778a730a9ca638c2d557dbc026 (diff) | |
download | CMake-34c25f64513772215c0b2cd3e6c145226a5024dc.zip CMake-34c25f64513772215c0b2cd3e6c145226a5024dc.tar.gz CMake-34c25f64513772215c0b2cd3e6c145226a5024dc.tar.bz2 |
Merge topic 'FindX11-xcb-components'
ce28748ced FindX11: add xcb-xtest and xcb-keysyms
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7052
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindX11/Test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/FindX11/Test/main.c | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt index ddee835..18a73a3 100644 --- a/Tests/FindX11/Test/CMakeLists.txt +++ b/Tests/FindX11/Test/CMakeLists.txt @@ -36,6 +36,8 @@ test_x11_component(x11_components xcb_icccm) test_x11_component(x11_components xcb_randr) test_x11_component(x11_components xcb_util) test_x11_component(x11_components xcb_xfixes) +test_x11_component(x11_components xcb_xtest) +test_x11_component(x11_components xcb_keysyms) test_x11_component(x11_components xcb_xkb) test_x11_component(x11_components Xcomposite) test_x11_component(x11_components Xdamage) diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c index ce6f224..653a2be 100644 --- a/Tests/FindX11/Test/main.c +++ b/Tests/FindX11/Test/main.c @@ -376,6 +376,34 @@ static void test_xcb_xfixes(void) # endif +# ifdef HAVE_xcb_xtest +# include <xcb/xtest.h> + +static void test_xcb_xtest(void) +{ + int screen_nbr; + xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr); + xcb_test_get_version_unchecked(connection, 1, 0); + xcb_disconnect(connection); +} + +# endif + +# ifdef HAVE_xcb_keysyms +# include <xcb/xcb_keysyms.h> + +static void test_xcb_keysyms(void) +{ + int screen_nbr; + xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr); + xcb_key_symbols_t* symbols = xcb_key_symbols_alloc(connection); + if (symbols != NULL) + xcb_key_symbols_free(symbols); + xcb_disconnect(connection); +} + +# endif + #endif #include <stddef.h> |