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.
This commit is contained in:
Corey Berla 2022-11-28 16:32:52 -08:00
parent b82fa26373
commit 8072d202e3

View File

@ -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;
}