[at-spi2-core] Do not query X unless DISPLAY or AT_SPI_DISPLAY are set
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Do not query X unless DISPLAY or AT_SPI_DISPLAY are set
- Date: Thu, 8 Aug 2013 16:26:01 +0000 (UTC)
commit 725b582d70873d2205dee622fa410894f28a67e9
Author: Mike Gorse <mgorse suse com>
Date: Thu Aug 8 11:21:15 2013 -0500
Do not query X unless DISPLAY or AT_SPI_DISPLAY are set
Previously, AT-SPI would hard-code a default display name of ":0" if
neither DISPLAY nor AT_SPI_DISPLAY were set. This seems unnecessary--the
environment variable ought to be set--and causes a warning to be
generated whenever a Gtk app is started under Wayland.
https://bugzilla.gnome.org/show_bug.cgi?id=701378
atspi/atspi-misc.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 12a2947..17f9bb2 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -870,7 +870,7 @@ spi_display_name (void)
{
display_env = g_getenv ("DISPLAY");
if (!display_env || !display_env[0])
- canonical_display_name = g_strdup (":0");
+ return NULL;
else
{
gchar *display_p, *screen_p;
@@ -1468,11 +1468,12 @@ get_accessibility_bus_address_x11 (void)
char *display_name;
display_name = spi_display_name ();
- if (display_name != NULL)
- {
- bridge_display = XOpenDisplay (display_name);
- g_free (display_name);
- }
+ if (!display_name)
+ return NULL;
+
+ bridge_display = XOpenDisplay (display_name);
+ g_free (display_name);
+
if (!bridge_display)
{
g_warning ("Could not open X display");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]