xcb-client-helper: Add a XCB client helper for tests
This patch introduces a small library wrapper around XCB to be used in
Xwayland tests.
It's being designed such that we do not advance without accounting for
all X11 events when changing the window state. It adds a fence that
waits for all events to be processed, and only after all the events have
been accounted for, to proceed further, resuming execution of the
tests.
This works by keeping a tentative_state list for the client and a
window state that gets applied when the event we waited for has been
received.
This is useful in test clients, which could verify at the end after
receiving all events that the correct state has been applied. Acts as a
way to verify that the we never get or have a different state than the
one we expect.
With it, this converts test-xwayland to using libxcb (together with
xcb-cursor-dev) rather than using Xlib, and with it it removes any Xlib
dependency we might have in the tests.
This only adds support for map/unmap/create/destroy/property notify.
A follow-up would be to expand this library to track window movement
and resizing.
Signed-off-by:
Marius Vlad <marius.vlad@collabora.com>
parent
87881e2c
No related branches found
No related tags found
Pipeline #820919 passed
Stage: Base container
Stage: Full build and test
Stage: No-GL build and test
Stage: Other builds
Stage: pages
Stage: deploy
Showing
- .gitlab-ci.yml 1 addition, 1 deletion.gitlab-ci.yml
- .gitlab-ci/debian-install.sh 1 addition, 0 deletions.gitlab-ci/debian-install.sh
- tests/meson.build 25 additions, 6 deletionstests/meson.build
- tests/xcb-client-helper.c 776 additions, 0 deletionstests/xcb-client-helper.c
- tests/xcb-client-helper.h 195 additions, 0 deletionstests/xcb-client-helper.h
- tests/xwayland-test.c 113 additions, 57 deletionstests/xwayland-test.c
tests/xcb-client-helper.c
0 → 100644
This diff is collapsed.
tests/xcb-client-helper.h
0 → 100644
Please register or sign in to comment