xwayland: Enable xtest libei integration

Enabling this feature makes Xwayland send xtest events via
the remote desktop portal and libei.
XWayland will create a new session for each X client (it keeps
contexts around and reuses them if the cmdline matches, so not
every xdotool invocation produces a new portal prompt).
This commit is contained in:
David Redondo 2024-04-15 16:51:07 +02:00
parent 4ebb21e8c3
commit 805435d157
4 changed files with 8 additions and 0 deletions

View file

@ -275,6 +275,7 @@ if (KWIN_BUILD_X11)
PURPOSE "Needed for running kwin_wayland" PURPOSE "Needed for running kwin_wayland"
) )
set(HAVE_XWAYLAND_LISTENFD ${Xwayland_HAVE_LISTENFD}) set(HAVE_XWAYLAND_LISTENFD ${Xwayland_HAVE_LISTENFD})
set(HAVE_XWAYLAND_ENABLE_EI_PORTAL ${Xwayland_HAVE_ENABLE_EI_PORTAL})
set(HAVE_GLX ${epoxy_HAS_GLX}) set(HAVE_GLX ${epoxy_HAS_GLX})
get_target_property(QT_DISABLED_FEATURES Qt6::Gui QT_DISABLED_PUBLIC_FEATURES) get_target_property(QT_DISABLED_FEATURES Qt6::Gui QT_DISABLED_PUBLIC_FEATURES)

View file

@ -12,6 +12,8 @@
# The version of Xwayland # The version of Xwayland
# ``Xwayland_HAVE_LISTENFD`` # ``Xwayland_HAVE_LISTENFD``
# True if (the requested version of) Xwayland has -listenfd option # True if (the requested version of) Xwayland has -listenfd option
# ``Xwayland_HAVE_ENABLE_EI_PORTAL``
# True if (the requested version of) Xwayland has -enable-ei-portal option
#============================================================================= #=============================================================================
# SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org> # SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org>
@ -25,6 +27,7 @@ pkg_check_modules(PKG_xwayland QUIET xwayland)
set(Xwayland_VERSION ${PKG_xwayland_VERSION}) set(Xwayland_VERSION ${PKG_xwayland_VERSION})
pkg_get_variable(Xwayland_HAVE_LISTENFD xwayland have_listenfd) pkg_get_variable(Xwayland_HAVE_LISTENFD xwayland have_listenfd)
pkg_get_variable(Xwayland_HAVE_ENABLE_EI_PORTAL xwayland have_enable_ei_portal)
find_program(Xwayland_EXECUTABLE NAMES Xwayland) find_program(Xwayland_EXECUTABLE NAMES Xwayland)
find_package_handle_standard_args(Xwayland find_package_handle_standard_args(Xwayland

View file

@ -28,5 +28,6 @@ constexpr QLatin1String KWIN_KILLER_BIN("${KWIN_KILLER_BIN}");
constexpr QLatin1String BREEZE_KDECORATION_PLUGIN_ID("${BREEZE_KDECORATION_PLUGIN_ID}"); constexpr QLatin1String BREEZE_KDECORATION_PLUGIN_ID("${BREEZE_KDECORATION_PLUGIN_ID}");
#endif #endif
#cmakedefine01 HAVE_XWAYLAND_LISTENFD #cmakedefine01 HAVE_XWAYLAND_LISTENFD
#cmakedefine01 HAVE_XWAYLAND_ENABLE_EI_PORTAL
#cmakedefine01 HAVE_GLX #cmakedefine01 HAVE_GLX
#cmakedefine01 HAVE_DL_LIBRARY #cmakedefine01 HAVE_DL_LIBRARY

View file

@ -186,6 +186,9 @@ bool XwaylandLauncher::start()
arguments << QStringLiteral("-displayfd") << QString::number(pipeFds[1]); arguments << QStringLiteral("-displayfd") << QString::number(pipeFds[1]);
arguments << QStringLiteral("-rootless"); arguments << QStringLiteral("-rootless");
arguments << QStringLiteral("-wm") << QString::number(fd); arguments << QStringLiteral("-wm") << QString::number(fd);
#if HAVE_XWAYLAND_ENABLE_EI_PORTAL
arguments << QStringLiteral("-enable-ei-portal");
#endif
m_xwaylandProcess = new QProcess(this); m_xwaylandProcess = new QProcess(this);
m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel); m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);