summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-11-28 16:32:52 -0800
committerCorey Berla <corey@berla.me>2022-11-28 17:02:13 -0800
commit8072d202e319aa889327d6b632c9c5c6a46b391d (patch)
tree2177900c6199f96a9ea8c6b132e4301a86b7e2fb
parentb82fa26373535bc6a8e130217d9ef17aec8c1511 (diff)
downloadgtk+-8072d202e319aa889327d6b632c9c5c6a46b391d.tar.gz
atspicontext: Cache empty atspi bus address
We are caching the bus address as data on the display object when it exists, but fail to set the data when the bus address doesn't exist. That causing excessive calls to GetAddress when the accesssbility bus doesn't exist. Make sure to cache a non-existent accessibility bus by setting the "" string.
-rw-r--r--gtk/a11y/gtkatspicontext.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index 4981ef269a..9840e731b4 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -1732,6 +1732,12 @@ get_bus_address (GdkDisplay *display)
#endif
out:
+
+ if (bus_address == NULL)
+ g_object_set_data_full (G_OBJECT (display), "-gtk-atspi-bus-address",
+ g_strdup (""),
+ g_free);
+
return bus_address;
}