summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-09-06 03:39:30 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-09-06 03:39:30 +0200
commit1e43ac742c7622beaa40902777a017efa3af2402 (patch)
tree20b6db42bb283fcca48aaef9664c244f6198a9da /bus
parent828048bfb4561c232dc668897f8203a3540edb0e (diff)
downloadat-spi2-core-1e43ac742c7622beaa40902777a017efa3af2402.tar.gz
at-spi-bus-launcher: Only clear AT_SPI_BUS X prop when having set it
In case where bus name acquisition fails, we shall not drop the AT_SPI_BUS X property of the existing daemon.
Diffstat (limited to 'bus')
-rw-r--r--bus/at-spi-bus-launcher.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
index 57727c15..af85f043 100644
--- a/bus/at-spi-bus-launcher.c
+++ b/bus/at-spi-bus-launcher.c
@@ -63,6 +63,9 @@ typedef struct {
/* -1 == error, 0 == pending, > 0 == running */
int a11y_bus_pid;
char *a11y_bus_address;
+#ifdef HAVE_X11
+ gboolean x11_prop_set;
+#endif
int pipefd[2];
int listenfd;
char *a11y_launch_error_message;
@@ -480,6 +483,7 @@ ensure_a11y_bus (A11yBusLauncher *app)
(guchar *) app->a11y_bus_address, strlen (app->a11y_bus_address));
XFlush (display);
XCloseDisplay (display);
+ app->x11_prop_set = TRUE;
}
}
#endif
@@ -886,7 +890,7 @@ main (int argc,
* we don't want early login processes to pick up the stale address.
*/
#ifdef HAVE_X11
- if (g_getenv ("DISPLAY") != NULL && g_getenv ("WAYLAND_DISPLAY") == NULL)
+ if (_global_app->x11_prop_set)
{
Display *display = XOpenDisplay (NULL);
if (display)