diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-09-04 12:44:15 +1000 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2023-06-26 13:19:19 +0200 |
commit | a13333427072dfb27792c5c9ff22ed145ede0f0a (patch) | |
tree | 7857b0a83c46b8c48fa4ae18372eee201a9daf79 /meson_options.txt | |
parent | aa4074251fa6135f65687b39cf11e1432208846c (diff) |
xwayland: Add XTEST support using EIS
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>
Diffstat (limited to 'meson_options.txt')
-rw-r--r-- | meson_options.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meson_options.txt b/meson_options.txt index 11d576780..e972717b9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,6 +8,8 @@ option('glamor', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto description: 'Enable glamor (default yes for Xorg/Xwayland builds)') option('xwayland_eglstream', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable EGLStream support for glamor on Xwayland') +option('xwayland_ei', type: 'combo', choices: ['socket', 'portal', 'false', 'auto'], + value: 'auto', description: 'Enable emulated input support on Xwayland') option('xnest', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable Xnest nested X server') option('xvfb', type: 'boolean', value: true, |