diff options
author | planc <hubenchang0515@outlook.com> | 2022-03-08 07:15:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-03-10 16:41:31 (GMT) |
commit | ce28748ced4ed6778a730a9ca638c2d557dbc026 (patch) | |
tree | 6adbd72f6b20246bdf694fe79ee969063cc266d5 /Tests/FindX11 | |
parent | cbd36eac23628f74ae3b50f9d1b8a0478c3e317a (diff) | |
download | CMake-ce28748ced4ed6778a730a9ca638c2d557dbc026.zip CMake-ce28748ced4ed6778a730a9ca638c2d557dbc026.tar.gz CMake-ce28748ced4ed6778a730a9ca638c2d557dbc026.tar.bz2 |
FindX11: add xcb-xtest and xcb-keysyms
Diffstat (limited to 'Tests/FindX11')
-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> |