summaryrefslogtreecommitdiff
path: root/hw/xfree86/doc
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-09-04 12:44:15 +1000
committerOlivier Fourdan <ofourdan@redhat.com>2023-06-26 13:19:19 +0200
commita13333427072dfb27792c5c9ff22ed145ede0f0a (patch)
tree7857b0a83c46b8c48fa4ae18372eee201a9daf79 /hw/xfree86/doc
parentaa4074251fa6135f65687b39cf11e1432208846c (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 'hw/xfree86/doc')
0 files changed, 0 insertions, 0 deletions