diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2019-05-21 15:59:37 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2019-05-21 16:16:30 +0200 |
commit | b68e60b75f4f6741da156d143c242b4a177a6434 (patch) | |
tree | f44155f4de7b2a306edae42f828e05ff9f0a7246 /atspi/atspi-misc.c | |
parent | ffba513d3c4a275fd665c0cbc4fb9e148eb4d258 (diff) | |
download | at-spi2-core-b68e60b75f4f6741da156d143c242b4a177a6434.tar.gz |
Resort to WAYLAND_DISPLAY checks to avoid X11 connections
Same reasoning applies (Opening and closing X11 displays may be from
ineffective to harmful there), but the XDG_SESSION_TYPE check breaks
for startx.
Explicitly check that DISPLAY is present but WAYLAND_DISPLAY is not,
in order to avoid this behavior.
Pointed out at
https://gitlab.gnome.org/GNOME/at-spi2-core/merge_requests/12
Diffstat (limited to 'atspi/atspi-misc.c')
-rw-r--r-- | atspi/atspi-misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c index 8d708496..f6809996 100644 --- a/atspi/atspi-misc.c +++ b/atspi/atspi-misc.c @@ -1601,7 +1601,8 @@ atspi_get_a11y_bus (void) if (address_env != NULL && *address_env != 0) address = g_strdup (address_env); #ifdef HAVE_X11 - if (!address && g_strcmp0 (g_getenv ("XDG_SESSION_TYPE"), "x11") == 0) + if (!address && g_getenv ("DISPLAY") != NULL && + g_getenv ("WAYLAND_DISPLAY") == NULL) address = get_accessibility_bus_address_x11 (); #endif if (!address) |