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 (6)
  • Olivier Fourdan's avatar
    xwayland: Add an option to enable EI portal support · cfcbb075
    Olivier Fourdan authored and Olivier Fourdan's avatar Olivier Fourdan committed
    
    With EI support wired to XTEST, and oeffis being enabled unconditionally
    means that Xwayland will always go through the XDG portal for XTEST when
    supported.
    
    While this the intended behavior for the general use case of Xwayland
    running rootless on a desktop compositor, that breaks when Xwayland is
    running on a nested compositor, because the portal is for the entire
    session and not limited to the nested Wayland compositor.
    
    Xwayland itself, as a regular Wayland client, has no way to tell that it
    is running on a nested compositor.
    
    So to keep backward compatibility with existing (and also common) use
    cases such as nested compositors, best is to disable support for the XDG
    portal by default, and add a new command line option "-enable-ei-portal"
    for the Wayland compositors (who spawn Xwayland rootless) to explicitly
    enable support for the input emulation XDG portal in Xwayland.
    
    A Wayland compositor running nested should not use that command line
    option with Xwayland.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: default avatarJoshua Ashton <joshua@froggi.es>
    Fixes: a1333342 - xwayland: Add XTEST support using EIS
    Closes: #1586
    See-also: https://gitlab.gnome.org/GNOME/mutter/-/issues/3047
    cfcbb075
  • Olivier Fourdan's avatar
    xwayland: Give up on EI on setup failure · 6b56ae68
    Olivier Fourdan authored and Olivier Fourdan's avatar Olivier Fourdan committed
    
    If we fail to setup EI, give up on using EI for XTEST and restore the
    default XTEST handlers.
    
    This happens when neither the portal nor the socket backends are usable.
    
    This does not affect the portal operation though, if the user choose not
    to allow a particular client, Xwayland would continue to use EI.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: default avatarJoshua Ashton <joshua@froggi.es>
    6b56ae68
  • Michel Dänzer's avatar
    test: Wait only up to 5 seconds for weston to start up · 3e938ed0
    Michel Dänzer authored
    This should be plenty even on CI, no need to wait for a whole minute if something
    goes wrong.
    3e938ed0
  • Michel Dänzer's avatar
    test: Kill weston whenever shell exits · e58203c1
    Michel Dänzer authored
    This script runs with -e, so if the timeout command returns a non-0
    exit status (meaning the while loop timed out), the script exits
    immediately as well.
    
    This would leave weston running in the background, which resulted in
    meson waiting for weston to terminate until hitting meson's own timeout.
    
    Instead, explicitly kill weston whenever the shell exits. This results
    in meson recording the test as failed immediately.
    
    As a bonus, we can drop the special handling around run-piglit.sh.
    
    v2:
    * Use trap (José Expósito)
    v3:
    * Explicitly use bash, and document a bashism we rely on
      (Olivier Fourdan)
    e58203c1
  • Michel Dänzer's avatar
    test: Propagate Xwayland stdout/stderr output and exit status · 129ec1cb
    Michel Dänzer authored
    If waiting for weston to start times out. This should make it easier
    to diagnose issues.
    129ec1cb
  • Michel Dänzer's avatar
    test: Skip Xwayland test early if PIGLIT_DIR / XTEST_DIR isn't set · d5ef57f1
    Michel Dänzer authored
    No point starting weston and waiting for it to start up in that case.
    d5ef57f1
......@@ -61,6 +61,15 @@ backend first, then fallback to the GBM backend if EGLStream is not supported
by the Wayland server. Without this option, \fIXwayland\fP tries the GBM
backend first, and fallback to EGLStream if GBM is not usable.
.TP 8
.B \-enable-ei-portal
Enable support for the XDG portal for input emulation.
A Wayland compositor running nested should not use that command line
option with Xwayland.
This option has no effect if the compositor doesn't support the relevant
XDG portal or if Xwayland was not compiled with EI and OEFFIS support.
.TP 8
.B \-fullscreen
Set the Xwayland window fullscreen when running rootful.
......
......@@ -186,6 +186,7 @@ xwayland_vars = [
'have_fullscreen=true',
'have_host_grab=true',
'have_decorate=' + have_libdecor.to_string(),
'have_enable_ei_portal=' + build_ei_portal.to_string(),
'have_byteswappedclients=true',
]
......
......@@ -812,6 +812,13 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
use_fixed_size = 1;
#else
ErrorF("This build does not have libdecor support\n");
#endif
}
else if (strcmp(argv[i], "-enable-ei-portal") == 0) {
#ifdef XWL_HAS_EI_PORTAL
xwl_screen->enable_ei_portal = 1;
#else
ErrorF("This build does not have XDG portal support\n");
#endif
}
}
......
......@@ -67,6 +67,7 @@ struct xwl_screen {
int host_grab;
int has_grab;
int decorate;
int enable_ei_portal;
CreateScreenResourcesProcPtr CreateScreenResources;
CloseScreenProcPtr CloseScreen;
......
......@@ -334,12 +334,14 @@ setup_ei_from_socket(struct xwl_ei_client *xwl_ei_client)
static struct xwl_ei_client *
setup_ei(ClientPtr client)
{
ScreenPtr pScreen = screenInfo.screens[0];
struct xwl_ei_client *xwl_ei_client = NULL;
struct xwl_screen *xwl_screen = xwl_screen_get(pScreen);
struct ei *ei = NULL;
char buffer[PATH_MAX];
const char *cmdname;
char *client_name = NULL;
bool status;
bool status = false;
cmdname = GetClientCmdName(client);
if (cmdname) {
......@@ -375,7 +377,8 @@ setup_ei(ClientPtr client)
xorg_list_init(&xwl_ei_client->pending_emulated_events);
xorg_list_init(&xwl_ei_client->abs_devices);
status = setup_oeffis(xwl_ei_client);
if (xwl_screen->enable_ei_portal)
status = setup_oeffis(xwl_ei_client);
if (!status)
status = setup_ei_from_socket(xwl_ei_client);
......@@ -384,6 +387,8 @@ setup_ei(ClientPtr client)
xwl_ei_client = NULL;
ei_unref(ei);
error_ei("EI setup failed\n");
/* We failed to setup EI using either backends, give up on EI. */
xwayland_restore_xtest();
}
out:
......
......@@ -109,6 +109,9 @@ ddxUseMsg(void)
#ifdef XWL_HAS_LIBDECOR
ErrorF("-decorate add decorations to Xwayland when rootful\n");
#endif
#ifdef XWL_HAS_EI_PORTAL
ErrorF("-enable-ei-portal use the XDG portal for input emulation\n");
#endif
}
static int init_fd = -1;
......@@ -246,6 +249,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
else if (strcmp(argv[i], "-decorate") == 0) {
return 1;
}
else if (strcmp(argv[i], "-enable-ei-portal") == 0) {
return 1;
}
return 0;
}
......
#!/bin/sh -e
#!/bin/bash -e
if test "x$XTEST_DIR" = "x"; then
echo "XTEST_DIR must be set to the directory of the xtest repository."
# Exit as a "skip" so make check works even without xtest.
exit 77
fi
if test "x$PIGLIT_DIR" = "x"; then
echo "PIGLIT_DIR must be set to the directory of the piglit repository."
# Exit as a "skip" so make check works even without piglit.
exit 77
fi
# this times out on Travis, because the tests take too long.
if test "x$TRAVIS_BUILD_DIR" != "x"; then
......@@ -17,8 +29,17 @@ weston --no-config --backend=headless-backend.so --socket=wayland-$$ &
WESTON_PID=$!
export WAYLAND_DISPLAY=wayland-$$
# Need to kill weston before exiting, or meson will time out waiting for it to terminate
# We rely on bash's behaviour, which executes the EXIT trap handler even if the shell is
# terminated due to receiving a signal
trap 'kill $WESTON_PID' EXIT
# Wait for weston to initialize before starting Xwayland
timeout --preserve-status 60s bash -c "while ! $XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo -displayfd 1 &>/dev/null; do sleep 1; done"
if ! timeout 5s bash -c "while ! $XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo -displayfd 1 &>/dev/null; do sleep 1; done"; then
# Try running Xwayland one more time, so we can propagate its stdout/stderr
# output and exit status
$XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo -displayfd 1
fi
# Start an Xwayland server
export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xwayland
......@@ -38,10 +59,4 @@ PIGLIT_ARGS="$PIGLIT_ARGS -x xsetfontpath@2"
export PIGLIT_ARGS
# Do not let run-piglit.sh exit status terminate this script prematurely
set +e
$XSERVER_DIR/test/scripts/run-piglit.sh
PIGLIT_STATUS=$?
kill $WESTON_PID
exit $PIGLIT_STATUS