Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • chengbo7135/xserver
  • wjp/xserver
  • DemiMarie/xserver
  • alanc/xserver
  • uvas/xserver
  • cl91/xserver
  • heymiaoO/xserver
  • oreaus/xserver
  • stapelberg/xserver
  • PaulKocialkowski/xserver
  • CendioOssman/xserver
  • wiz/xserver
  • maos20008/xserver
  • dougvj/xserver
  • mgorse1/xserver
  • gldrk/xserver
  • TMR5454/xserver
  • Kyawswat/xserver
  • hexiaodong/xserver
  • gilvbp/xserver
  • vliaskov/xserver
  • aarondill/xserver
  • zzyiwei/xserver
  • kleinerm/xserver
  • jcherry/xserver
  • jcristau/xserver
  • nathankidd/xserver
  • jexposit/xserver
  • refi_64/xserver
  • kbrenneman/xserver
  • kupper.pa/xserver
  • LickmeDown/xserver
  • zboszor/xserver
  • jadahl/xserver
  • shadeslayer/xserver
  • mherrb/xserver
  • Julia/xserver
  • twaik/xserver
  • fvalasiad/xserver
  • zzxyb/xserver
  • HermannSW/xserver
  • erwinou/xserver
  • ekurzinger/xserver
  • nacho.resa/xserver
  • agoins/xserver
  • NSUTanghaixiang/xserver
  • p12tic/xserver
  • huxd1532/xserver
  • keithp/xserver
  • vinilokorlok/xserver
  • bbeckett/xserver
  • dslater38/xserver
  • zzag/xserver
  • emersion/xserver
  • djlucas/xserver
  • ccullumbine2018/xserver
  • daniels/xserver
  • llandwerlin/xserver
  • matt335672/xserver
  • doraskayo/xserver
  • afett/xserver
  • XDXTHX/xserver
  • xexaxo/xserver
  • ecurtin/xserver
  • rbernon/xserver
  • pekdon/xserver
  • karolherbst/xserver
  • russellcnv/xserver
  • mbiebl/xserver
  • orbea/xserver
  • vsyrjala/xserver
  • lyudess/xserver
  • manu/xserver
  • lucmann/xserver
  • tholin/xserver
  • yarivb/xserver
  • tmlind/xserver
  • chema/xserver
  • J-Bu/xserver
  • chenhuacai/xserver
  • E5ten/xserver
  • haagch/xserver
  • whot/xserver
  • strassek/xserver
  • mntmn/xserver
  • liyi42/xserver
  • YusufKhan-gamedev/xserver
  • iv-m/xserver
  • vanvugt/xserver
  • Rui511/xserver
  • catap/xserver
  • tjbp/xserver
  • webi123/xserver
  • noblock/xserver
  • freemangordon/xserver
  • xdandys/xserver
  • jbeich/xserver
  • zeising/xserver
  • romangg/xserver
  • pq/xserver
  • azhadchenko/xserver
  • Emantor/xserver
  • carlosg/xserver
  • kwg/xserver
  • pichika/xserver
  • klniu/xserver
  • TAAPArthur/xserver
  • sjoerd/xserver
  • Sjecai2/xserver
  • jturney/xserver
  • pkubaj/xserver
  • os369510/xserver
  • Zamundaaa/xserver
  • Gorg/xserver
  • lkundrak/xserver
  • niveditharau/xserver
  • ForTheReallys/xserver
  • jmonteiro/xserver
  • jocelyn/xserver
  • ThatMG393/xserver
  • fweimer/xserver
  • mlankhorst/xserver
  • marv/xserver
  • dbn/xserver
  • mattrope/xserver
  • coypoop/xserver
  • mwyraz/xserver
  • frog/xserver
  • 3v1n0/xserver
  • awilfox/xserver
  • muesli4/xserver
  • rarbab/xserver
  • yshui/xserver
  • jannau/xserver
  • mikeroyal/xserver
  • andrebsguedes/xserver
  • JeffyCN/xserver
  • ipominov/xserver
  • gtrentalancia/xserver
  • josch/xserver
  • lucyllewy/xserver
  • tomty89/xserver
  • qarmin/xserver
  • tagr/xserver
  • zwenna/xserver
  • bkylerussell/xserver
  • mupuf/xserver
  • zubzub/xserver
  • galaxytgtabiday/xserver
  • OlCe/xserver
  • ashafer/xserver
  • dengbo/xserver
  • valpackett/xserver
  • andreyknyazev077/xserver
  • antonovitch/xserver
  • contactshashanksharma/xserver-fork-shashank
  • akihiko.odaki/xserver
  • sknsean/xserver
  • rnpnr/xserver
  • hitong602/xserver
  • halfline/xserver
  • ismailsiege/xserver
  • dongwonk/xserver
  • Fatton1/xserver
  • GermanAizek/xserver
  • daenzer/xserver
  • FeepingCreature/xserver
  • mvlad/xserver
  • puleglot/xserver
  • smelenius/xserver
  • sewn/xserver
  • kaichuan.hsieh/xserver
  • SimonPilkington/xserver
  • adamdruppe/xserver
  • floppym/xserver
  • trevdave/xserver
  • luke-jr/xserver
  • headrush/xserver
  • davidriley/xserver
  • heitbaum/xserver
  • mrisaacb/xserver
  • goosen78/xserver
  • Ma/xserver
  • gmbr3/xserver
  • tsutsui/xserver
  • sherrodejjohnson/xserver
  • hassoon1986/xserver
  • lanodan/xserver
  • ydc-dadada/xserver
  • wengxt/xserver
  • icenowy/xserver
  • denisfa/xserver
  • StarsGreen/xserver
  • adamjrichter/xserver
  • bigon/xserver
  • djacewicz/xserver
  • davidre/xserver
  • kylin0061/xserver
  • arrowd/xserver
  • ernstp/xserver
  • bbrezillon/xserver
  • penguin42/xserver
  • anarsoul/xserver
  • marvinjr35/xserver
  • gerddie/xserver
  • xry111/xserver
  • psyruss85/xserver
  • volkanorhan/xserver
  • luporl/xserver
  • cbur201592/xserver
  • bphaslett/xserver
  • guillem/xserver
  • haihao/xserver
  • peterh/xserver
  • miztake/xserver
  • zaps166/xserver
  • lostgoat/xserver
  • vfjpl/xserver
  • bentiss/xserver
  • rilian-la-te/xserver
  • wujiangGitHub/xserver
  • cubanismo/xserver
  • arichardson/xserver
  • schreibemirhalt/xserver
  • jsg/xserver
  • karlosrangel337/xserver
  • knisht/xserver
  • manuelcrack642/xserver
  • ross/xserver
  • topimiettinen/xserver
  • davidedmundson/xserver
  • DPA/xserver
  • dkorkmazturk/xserver
  • karamjameelmoore/xserver
  • lihongtao/xserver
  • sthibaul/xserver
  • RyzenDew/xserver
  • christian-rauch/xserver
  • Vivek/xserver
  • peigongdsd/xserver
  • peng.jin/xserver
  • alagner/xserver
  • mehdigh419/xserver
  • dixler/xserver
  • BBaoVanC/xserver
  • Drakulix/xserver
  • Acidburn0zzz/xserver
  • bafanahub/xserver
  • benpicco/xserver
  • yangxiaojuan-loongson/xserver
  • kaocher82/xserver
  • pepp/xserver
  • cgzones/xserver
  • luyn/xserver
  • 1740301466jxz/xserver
  • ids1024/xserver
  • svalaskevicius/xserver
  • ZhiJie.Zhang/xserver
  • metux/xserver
  • eschwartz/xserver
  • jayantpranjal0/xserver
  • hmazlan/xserver
  • kerneltoast/xserver
  • Michaelypk/xserver
  • dottedmag/xserver
  • aplattner/xserver
  • sergiomb/xserver
  • looi/xserver
  • robclark/xserver
  • tzimmermann/xserver
  • vitoux.pascal/xserver
  • aditj/xserver
  • kennylevinsen/xserver
  • Kishore409/xserver
  • Daasin/xserver
  • dirbaio/xserver
  • xinbowang/xserver
  • mwei/xserver
  • SpikyCaterpillar1/xserver
  • devin11911191/xserver
  • xorg/xserver
  • alex-tu-cc/xserver
  • kaniini/xserver
  • jcourreges/xserver
  • n3rdopolis/xserver
  • zagursky/xserver
  • thesamesam/xserver
  • anholt/xserver
  • themaister/xserver
  • jrtc27/xserver
  • JoseExposito/xserver
  • Hi-Angel/xserver
  • City-busz/xserver
  • ydirson/xserver
  • dawnhan/xserver
  • avolkov/xserver
  • meMuszr/xserver
  • dk/xserver
  • cooperch/xserver
  • Tuetuopay/xserver
  • gabifalk/xserver
  • jeremyhu/xserver
  • 1480c1/xserver
  • Spintzyk/xserver
  • MisterDA/xserver
  • starnight/xserver
  • abono/xserver
  • ajax/xserver
  • dougg3/xserver
  • chenx_dust/xserver
  • EXtremeExploit/xserver
  • jwrdegoede/xserver
  • road2react/xserver
  • acelan/xserver
  • airlied/xserver
  • gfxstrand/xorg-xserver
  • justazarsky/xserver
  • sri-ka1ki/xserver
  • rgfernandes/xserver
  • lynxeye/xserver
  • tintou/xserver
  • mattst88/xserver
  • rmader/xserver
  • linkmauve/xserver
  • kamarul6401/xserver
  • andy-zetier/xserver
  • gsittyz/xserver
  • bernhardu/xserver
  • causztic/xserver
  • cpmichael/modesetting
  • ryanneph/xserver
  • zhangyaning/xserver
  • olv/xserver
  • hongaoo/xserver
  • LiChenG-P/xserver
  • Ivaniku/x-taylan
  • dkg/xserver
  • ofourdan/xserver
  • mahkoh/xserver
  • AkiSakurai/xserver
  • msizanoen1/xserver
341 results
Show changes
Commits on Source (3)
  • Olivier Fourdan's avatar
    input: Add new hook DeviceSendEventsProc for XTEST · aa407425
    Olivier Fourdan authored
    
    For Xwayland, we need to be able to send the events that would normally
    be processed by the normal Xserver event processing to be forwarded to
    the Wayland compositor (somehow).
    
    Add a new hook “DeviceSendEventsProc” attached to the device so that
    Xwayland can implement its own routine instead of the “normal” XTEST
    implementation which generates and processes X input events.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    aa407425
  • Peter Hutterer's avatar
    xwayland: Add XTEST support using EIS · a1333342
    Peter Hutterer authored and Olivier Fourdan's avatar Olivier Fourdan committed
    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: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Co-authored-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Co-authored-by: default avatarDavid Redondo <kde@david-redondo.de>
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    a1333342
  • Olivier Fourdan's avatar
    xwayland: Fallback to plain XTEST if EI does not work · befef003
    Olivier Fourdan authored
    
    With optional EI support in Xwayland, we would route XTEST events to EI
    so that they get actually emulated in the Wayland compositor.
    
    However, this implies that EI is actually supported in various places,
    including the Wayland compositor of course. If, for whatever reason, we
    fail to use EI, the actual XTEST events will be dropped.
    
    That might be seen as a regression, as previously those would go through
    the usual X11 processing of events and might have worked with X11 native
    clients.
    
    So, to keep backward compatibility, fallback to the plain old XTEST
    method if EI is not available or not usable.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    befef003
......@@ -19,7 +19,7 @@ variables:
FDO_UPSTREAM_REPO: xorg/xserver
FDO_DISTRIBUTION_VERSION: bullseye-slim
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
FDO_DISTRIBUTION_TAG: "2023-06-18-xorgproto-2023.2"
FDO_DISTRIBUTION_TAG: "2023-06-20-libei.0"
include:
- project: 'freedesktop/ci-templates'
......
......@@ -99,6 +99,8 @@ apt-get install -y \
mingw-w64-tools \
nettle-dev \
pkg-config \
python3-attr \
python3-jinja2 \
python3-mako \
python3-numpy \
python3-six \
......@@ -161,6 +163,14 @@ ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
cd ..
rm -rf libdecor
# Install libei for Xwayland
git clone https://gitlab.freedesktop.org/libinput/libei.git --depth 1 --branch=1.0.0
cd libei
meson setup _build -Dtests=disabled -Ddocumentation=[] -Dliboeffis=enabled
ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
cd ..
rm -rf libei
git clone https://gitlab.freedesktop.org/mesa/piglit.git
cd piglit
git checkout 265896c86f90cb72e8f218ba6a3617fca8b9a1e3
......
......@@ -148,6 +148,35 @@ ProcXTestCompareCursor(ClientPtr client)
return Success;
}
static void
XTestDeviceSendEvents(DeviceIntPtr dev,
int type,
int detail,
int flags,
const ValuatorMask *mask)
{
int nevents = 0;
int i;
switch (type) {
case MotionNotify:
nevents = GetPointerEvents(xtest_evlist, dev, type, 0, flags, mask);
break;
case ButtonPress:
case ButtonRelease:
nevents = GetPointerEvents(xtest_evlist, dev, type, detail, flags, mask);
break;
case KeyPress:
case KeyRelease:
nevents =
GetKeyboardEvents(xtest_evlist, dev, type, detail);
break;
}
for (i = 0; i < nevents; i++)
mieqProcessDeviceEvent(dev, &xtest_evlist[i], miPointerGetScreen(inputInfo.pointer));
}
static int
ProcXTestFakeInput(ClientPtr client)
{
......@@ -161,8 +190,6 @@ ProcXTestFakeInput(ClientPtr client)
int valuators[MAX_VALUATORS] = { 0 };
int numValuators = 0;
int firstValuator = 0;
int nevents = 0;
int i;
int base = 0;
int flags = 0;
int need_ptr_update = 1;
......@@ -408,26 +435,9 @@ ProcXTestFakeInput(ClientPtr client)
if (screenIsSaved == SCREEN_SAVER_ON)
dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
switch (type) {
case MotionNotify:
valuator_mask_set_range(&mask, firstValuator, numValuators, valuators);
nevents = GetPointerEvents(xtest_evlist, dev, type, 0, flags, &mask);
break;
case ButtonPress:
case ButtonRelease:
valuator_mask_set_range(&mask, firstValuator, numValuators, valuators);
nevents = GetPointerEvents(xtest_evlist, dev, type, ev->u.u.detail,
flags, &mask);
break;
case KeyPress:
case KeyRelease:
nevents =
GetKeyboardEvents(xtest_evlist, dev, type, ev->u.u.detail);
break;
}
valuator_mask_set_range(&mask, firstValuator, numValuators, valuators);
for (i = 0; i < nevents; i++)
mieqProcessDeviceEvent(dev, &xtest_evlist[i], miPointerGetScreen(inputInfo.pointer));
(*dev->sendEventsProc) (dev, type, ev->u.u.detail, flags, &mask);
if (need_ptr_update)
miPointerUpdateSprite(dev);
......@@ -634,6 +644,9 @@ AllocXTestDevice(ClientPtr client, const char *name,
XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
FALSE);
XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL);
(*ptr)->sendEventsProc = XTestDeviceSendEvents;
(*keybd)->sendEventsProc = XTestDeviceSendEvents;
}
free(xtestname);
......
......@@ -92,6 +92,15 @@ srcs += code.process(shortcuts_inhibit_xml)
srcs += code.process(xwayland_shell_xml)
srcs += code.process(tearing_xml)
if build_ei
xwayland_dep += libei_dep
srcs += [ 'xwayland-xtest.c', 'xwayland-xtest.h' ]
if build_ei_portal
xwayland_dep += liboeffis_dep
endif
endif
xwayland_glamor = []
eglstream_srcs = []
if build_glamor
......
......@@ -44,6 +44,10 @@
#include "xwayland-window.h"
#include "xwayland-screen.h"
#ifdef XWL_HAS_EI
#include "xwayland-xtest.h"
#endif
#include "pointer-constraints-unstable-v1-client-protocol.h"
#include "relative-pointer-unstable-v1-client-protocol.h"
#include "tablet-unstable-v2-client-protocol.h"
......@@ -3492,10 +3496,17 @@ InitInput(int argc, char *argv[])
pScreen->XYToWindow = xwl_xy_to_window;
xwl_screen_roundtrip(xwl_screen);
#ifdef XWL_HAS_EI
if (xwl_screen->rootless)
xwayland_override_xtest();
#endif
}
void
CloseInput(void)
{
#ifdef XWL_HAS_EI
xwayland_restore_xtest();
#endif
mieqFini();
}
......@@ -51,6 +51,9 @@
#include "xwayland-pixmap.h"
#include "xwayland-present.h"
#include "xwayland-shm.h"
#ifdef XWL_HAS_EI
#include "xwayland-xtest.h"
#endif
#ifdef MITSHM
#include "shmint.h"
......@@ -748,6 +751,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen);
xwl_screen->screen = pScreen;
#ifdef XWL_HAS_EI
if (!xwayland_ei_init())
return FALSE;
#endif
#ifdef XWL_HAS_GLAMOR
xwl_screen->glamor = 1;
#endif
......
This diff is collapsed.
/*
* Copyright © 2020 Red Hat
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of the
* copyright holders not be used in advertising or publicity
* pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied
* warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef XWAYLAND_XTEST_H
#define XWAYLAND_XTEST_H
#include <xwayland-config.h>
Bool xwayland_ei_init(void);
void xwayland_override_xtest(void);
void xwayland_restore_xtest(void);
#endif
......@@ -191,6 +191,12 @@ typedef Bool (*PointerAccelSchemeInitProc) (DeviceIntPtr /*dev */ ,
struct _ValuatorAccelerationRec *
/*protoScheme */ );
typedef void (*DeviceSendEventsProc) (DeviceIntPtr /*dev */ ,
int /* event type */ ,
int /* detail, buttons or keycode */ ,
int /* flags */ ,
const ValuatorMask * /* valuators */ );
typedef struct _DeviceRec {
void *devicePrivate;
ProcessInputProc processInputProc; /* current */
......
......@@ -628,6 +628,7 @@ typedef struct _DeviceIntRec {
/* XTest related master device id */
int xtest_master_id;
DeviceSendEventsProc sendEventsProc;
struct _SyncCounter *idle_counter;
} DeviceIntRec;
......
......@@ -421,6 +421,8 @@ xwayland_data.set('XWL_HAS_GLAMOR', build_glamor and (gbm_dep.found() or build_e
xwayland_data.set('XWL_HAS_EGLSTREAM', build_eglstream ? '1' : false)
xwayland_data.set('XWL_HAS_LIBDECOR', have_libdecor ? '1' : false)
xwayland_data.set('XWL_HAS_XWAYLAND_EXTENSION', xwaylandproto_dep.found() ? '1' : false)
xwayland_data.set('XWL_HAS_EI', build_ei)
xwayland_data.set('XWL_HAS_EI_PORTAL', build_ei_portal)
configure_file(output : 'xwayland-config.h',
input : 'xwayland-config.h.meson.in',
......
......@@ -15,3 +15,9 @@
/* Build Xwayland with XWAYLAND extension */
#mesondefine XWL_HAS_XWAYLAND_EXTENSION
/* Enable EI */
#mesondefine XWL_HAS_EI
/* Enable XDG portal integration */
#mesondefine XWL_HAS_EI_PORTAL
......@@ -374,6 +374,17 @@ else
build_eglstream = false
endif
if build_xwayland
libei_dep = dependency('libei-1.0', version: '>= 1.0.0', required: get_option('xwayland_ei') in ['portal', 'socket'])
liboeffis_dep = dependency('liboeffis-1.0', version: '>= 1.0.0', required: get_option('xwayland_ei') == 'portal')
build_ei = libei_dep.found() and get_option('xwayland_ei') != 'false'
build_ei_portal = liboeffis_dep.found() and get_option('xwayland_ei') in ['portal', 'auto']
else
build_ei = false
build_ei_portal = false
endif
# Lots of sha1 options, because Linux is about choice :)
# The idea behind the ordering here is that we should first prefer system
......
......@@ -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,
......