diff options
author | Mike Gorse <mgorse@suse.com> | 2012-07-09 17:41:38 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2012-07-09 17:41:38 -0500 |
commit | 67b25d0f9eea338fb2eaa4e34a83e2b720e54e0e (patch) | |
tree | 4a022239ea69af760676ed9db8be58b713c052de | |
parent | f734be9d27abe565c211dc2cd0f360e73fd32c1f (diff) | |
download | at-spi2-atk-67b25d0f9eea338fb2eaa4e34a83e2b720e54e0e.tar.gz |
Only send property-change signals relevant for caching, absent listeners
Previously, all property-change signals were passed on, regardless of any
registered listeners, because some of them are used by libatspi to keep the
cache up-to-date. However, gtk sends many notifications for property changes
that would have no impact on libatspi's caching code, so we should not waste
time building and sending D-Bus messages for them unless something is
interested in the event.
https://bugzilla.gnome.org/show_bug.cgi?id=674719
-rw-r--r-- | atk-adaptor/event.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c index 859d399..efd9c20 100644 --- a/atk-adaptor/event.c +++ b/atk-adaptor/event.c @@ -371,7 +371,11 @@ signal_is_needed (const gchar *klass, const gchar *major, const gchar *minor) * TODO: FOr 2.2, have at-spi2-core define a special "cache listener" for * this instead, so that we don't send these if no one is listening */ if (!g_strcmp0 (data [1], "ChildrenChanged") || - !g_strcmp0 (data [1], "PropertyChange") || + ((!g_strcmp0 (data [1], "PropertyChange")) && + (!g_strcmp0 (data [2], "accessible-name") || + !g_strcmp0 (data [2], "accessible-description") || + !g_strcmp0 (data [2], "accessible-parent") || + !g_strcmp0 (data [2], "accessible-role"))) || !g_strcmp0 (data [1], "StateChanged")) { g_free (data [2]); |