diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-05-19 15:08:42 +0200 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2021-05-19 15:14:26 +0200 |
commit | 8d514cc1b8456224fa687bc0e32d26c3b4b994c0 (patch) | |
tree | 20a73f33901cdd75934416eac07ff52d039dafd9 /bus/meson.build | |
parent | 1a7d59f174a66d2b46a7774c1f09154a94ea151c (diff) | |
download | at-spi2-core-8d514cc1b8456224fa687bc0e32d26c3b4b994c0.tar.gz |
bus: Set X root property when Xwayland starts on-demand
On wayland, the X11 server may not always be running so that
at-spi-bus-launcher cannot set it when it is starting.
This is usually not a big problem, as applications can retrieve the a11y
bus address by querying the session bus. Unfortunately, there may be
exceptions such as applications that are run as a different user.
We can easily solve this problem by setting the X11 root property when
the Xwayland server is started. To do so, install a simple script to
/etc/xdg/Xwayland-session.d/ that queries the session bus and sets the
root property.
This script is only needed when Xwayland is started on-demand, which can
only happen on systemd enabled sessions. However, it is always safe to
install, and there will be no severe side effects should the script be
running needlessly or failing.
Closes: #34
Diffstat (limited to 'bus/meson.build')
-rw-r--r-- | bus/meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bus/meson.build b/bus/meson.build index f6c32c99..3504fb31 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -6,6 +6,7 @@ accessibility_conf.set('DATADIR', atspi_datadir) busconfig_dir = join_paths(atspi_datadir, 'defaults/at-spi2') session_dir = join_paths(atspi_sysconfdir, 'xdg/autostart') +xwayland_session_dir = join_paths(atspi_sysconfdir, 'xdg/Xwayland-session.d') configure_file(input: 'accessibility.conf.in', output: 'accessibility.conf', @@ -27,6 +28,13 @@ configure_file(input: 'at-spi-dbus-bus.service.in', configuration: libexec_conf, install_dir: systemd_user_dir) +if x11_dep.found() + # Note: It is safe to always install it. However, we only need this on + # systemd enabled machines where Xwayland may be started on-demand. + install_data('00-at-spi', + install_dir: xwayland_session_dir) +endif + launcher_args = [ '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), '-DDATADIR="@0@"'.format(atspi_datadir), |