diff options
author | Mike Gorse <mgorse@novell.com> | 2011-05-22 18:42:19 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@novell.com> | 2011-05-22 18:42:19 -0500 |
commit | afb48dd77231e55de0afd6560038cf4af6264ec6 (patch) | |
tree | f6dcccbb284e20a8002b8b61aff268b3d2964937 | |
parent | 76eef82a0842f4db4d70aad466e8af5ca4ec3956 (diff) | |
download | at-spi2-atk-afb48dd77231e55de0afd6560038cf4af6264ec6.tar.gz |
Always emit children-changed, property-change, and state-changed events
libatspi currently listens for ChildrenChanged, PropertyChange, and
StateChanged events but does not call RegisterEvent for them.
Intending to come up with a better fix for 2.2.
-rw-r--r-- | atk-adaptor/event.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c index 8d04246..a616879 100644 --- a/atk-adaptor/event.c +++ b/atk-adaptor/event.c @@ -363,6 +363,19 @@ signal_is_needed (const gchar *klass, const gchar *major, const gchar *minor) data [2] = ensure_proper_format (minor); data [3] = NULL; + /* Hack: Always pass events that update the cache. + * 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], "StateChanged")) + { + g_free (data [2]); + g_free (data [1]); + g_free (data [0]); + return TRUE; + } + /* Hack: events such as "object::text-changed::insert:system" as generated by Gecko */ data [2][strcspn (data [2], ":")] = '\0'; @@ -376,7 +389,9 @@ signal_is_needed (const gchar *klass, const gchar *major, const gchar *minor) } } -//printf("event: %s %s %s: %d\n", data[0], data[1], data[2], ret); +#if 0 + g_print("event: %s %s %s: %d\n", data[0], data[1], data[2], ret); +#endif g_free (data [2]); g_free (data [1]); g_free (data [0]); |