summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
Diffstat (limited to 'bus')
-rw-r--r--bus/at-spi-bus-launcher.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
index 98f4114c..436e6a39 100644
--- a/bus/at-spi-bus-launcher.c
+++ b/bus/at-spi-bus-launcher.c
@@ -466,7 +466,7 @@ ensure_a11y_bus (A11yBusLauncher *app)
#endif
#ifdef HAVE_X11
- if (g_strcmp0 (g_getenv ("XDG_SESSION_TYPE"), "x11") == 0)
+ if (g_getenv ("DISPLAY") != NULL && g_getenv ("WAYLAND_DISPLAY") == NULL)
{
Display *display = XOpenDisplay (NULL);
if (display)
@@ -885,7 +885,7 @@ main (int argc,
* we don't want early login processes to pick up the stale address.
*/
#ifdef HAVE_X11
- if (g_strcmp0 (g_getenv ("XDG_SESSION_TYPE"), "x11") == 0)
+ if (g_getenv ("DISPLAY") != NULL && g_getenv ("WAYLAND_DISPLAY") == NULL)
{
Display *display = XOpenDisplay (NULL);
if (display)