This adds support for XTEST in Xwayland using EIS, the emulated input
library [1].
To differentiate between X11 clients using XTEST, initiate a EI context
for each client and use the actual client name, from its command
line.
When an X11 client first tries to use XTEST to generate emulated input
events, a new connection to libEI is initiated by Xwayland on behalf
of the X11 client.
During that connection phase, the EI server will not be accepting
events until the emulated device is actually created, meaning that any
XTEST request from the X11 client will be discarded until the EI server
is willing to accept events.
To avoid that issue, add an event queue in Xwayland per X11 client that
will keep those requests, and dequeue them as soon as the EI server is
ready, i.e. once the EI device is added.
If the X11 client disconnects from the Xserver before the EI server is
ready, or if the connection is closed by the EI server, those events are
discarded and the queue cleared from any pending events.
For 10 minutes after the client disconnects, keep the internal struct
alive. If a client with the same commandline arguments connects again,
re-use the same struct. This means we are faster with the events the
second time around but it also allows the EIS server to pause individual
clients that keep sending intermittent events and disconnect immediately
(e.g. it'd be possible to pause xdtotool while an authentication prompt
is active).
[1] https://gitlab.freedesktop.org/libinput/libei
Thanks to Jan Beich <jbeich@FreeBSD.org> for fixing the build on BSD.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Co-authored-by: Olivier Fourdan <ofourdan@redhat.com>
Co-authored-by: David Redondo <kde@david-redondo.de>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This is needed for tearing-updates-v1
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Multiple reasons, in particular:
* Doing it in every build & test job duplicates effort, resulting in
the pipeline taking longer than necessary.
* We cannot limit the number of test processes spawned by meson dist.
* There's little point running tests for dist anyway, we just want to
make sure we can build & install from the generated tarball.
This lets us actually limit the number of test processes spawned in
parallel.
(ninja test runs meson test without --num-processes, so it ends up
spawning as many processes in parallel as there are CPU cores)
Debian Bullseye only has 1.20, so we need to bump this.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
wayland-protocols requires wayland-scanner 1.20, but Debian bullseye has 1.18 only
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Without these, the build jobs would spuriously pass if some of the
expected piglit tests didn't run at all.
v2:
* Use local variables instead of starting their names with underscores
(Peter Hutterer)
Will make it easier to do more complex shell stuff.
No functional change intended.
v2:
* Use /bin/bash instead of /bin/sh (Peter Hutterer)
* Export environment variables on a separate line (Peter)
* Use "set" command instead of shell command line arguments, for
consistency with debian-install.sh.
This extension exists to serve one purpose: reliably identifying
Xwayland. Previous attempts at doing so included querying root window
properties, output names or input device names. All these attempts are
somewhat unreliable. Instead, let's use an extension - where that
extension is present we have an Xwayland server.
Clients should never need to do anything but check whether the extension
exists through XQueryExtension or search through XListExtensions.
This extension provides a single QueryVersion request only, and
that is only to provide future compatibility if we ever need anything
other than "this extension exists" functionality.
https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/54
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Add libdecor 0.1.0 to CI.
v2: Build with and without libdecor
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Only cross-build for x86 MinGW-w64, as x64 MinGW-w64 will probably
require fixing LLP64 issues.
I don't know any source for pre-built cross-dependencies of the X
server, so build these from git.
Don't build with GLX enabled, so I don't have to deal with
cross-building mesa and it's dependencies, for the moment.
While this isn't critical yet, it might become so at some point, so
let's make sure it keeps working.
Don't set the PIGLIT/XTEST_DIR variables for ninja dist, testing XTS
once against each DDX is enough (as part of ninja test).
Requires git in the docker image.
v2:
* Drop /usr/local/bin/xkbcomp symlink, no longer needed with xkbcomp
1.4.1 (Peter Hutterer)
It runs XTS via piglit on (non-rootless) Xwayland on weston using the
headless backend.
Xwayland might use glamor if enabled in the build, but we're making sure
it uses software rendering.
v2:
* Use weston-info to wait for weston to be ready, instead of just a
fixed sleep. (Martin Peres)
v3:
* Build wayland 1.18 & weston 9.0 locally, since the packages in Debian
buster are too old for current Xwayland.
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
By its nature, testing incurs a risk of breaking something every time
we bump the image.
This requires building wayland-protocols locally, since the package in
buster is too old for current Xwayland.
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
In order to build-test the Xwayland eglstream code.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
The shared GitLab CI runners are configured for jobs making use of up
to 4 CPU cores, attempting to use more may overload them.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
This catches the broken manpages in the autoconf build which appeared
after commit 2e497bf887 ("man: s/__/@/g") and were only partly
rectified by commit 0445705a8b ("man: Fix automake seddery").
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
For really testing glamor, we want it installed. Use master instead
of whatever version is in repos, because we'll want to update when new
tests are added.
Signed-off-by: Eric Anholt <eric@anholt.net>
There shouldn't be a difference for users, but this way we do manage
all of our containers from freedesktop.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
The latter use Python 2 and break with any non-ASCII characters in the
environment, the former uses Python 3 and works fine in that case.
Reviewed-by: Eric Anholt <eric@anholt.net>
This removes the dependency on an externally generated docker image, and
should make it easier to update the docker image or make other changes
related to it.
This is based on Debian testing, because I'm most familiar with Debian.
But it should be easy to base it on another distro.
v2:
* Use kaniko instead of docker-in-docker for image generation, so it can
also work in unprivileged runners.
* Drop piglit.conf & tetexec.cfg overrides, just make sure the files in
the image work.