From: Corey Berla Date: Tue, 29 Nov 2022 00:32:52 +0000 (-0800) Subject: atspicontext: Cache empty atspi bus address X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~62^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8072d202e319aa889327d6b632c9c5c6a46b391d;p=gtk4.git 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. --- 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; }