summaryrefslogtreecommitdiff
path: root/atspi/atspi-event-listener.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2012-10-05 17:40:55 -0400
committerMike Gorse <mgorse@suse.com>2012-10-05 17:40:55 -0400
commita3b7c7d33a3f8fce93f252b1c205a792c1a73727 (patch)
tree4f40eaa2a7fcd5934671359cd9a2cf11c9f49b4f /atspi/atspi-event-listener.c
parent79147b60ed54cb41434cb8b6c246b4933e29e7d5 (diff)
downloadat-spi2-core-a3b7c7d33a3f8fce93f252b1c205a792c1a73727.tar.gz
Update cache in response to role change notifications
We update the cache in response to name, description, and parent property-change signals, but we were missing code to handle signals for role changes. https://bugzilla.gnome.org/show_bug.cgi?id=685469
Diffstat (limited to 'atspi/atspi-event-listener.c')
-rw-r--r--atspi/atspi-event-listener.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 6e70318c..26f1105d 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -270,6 +270,18 @@ cache_process_property_change (AtspiEvent *event)
event->source->cached_properties &= ~ATSPI_CACHE_DESCRIPTION;
}
}
+ else if (!strcmp (event->type, "object:property-change:accessible-role"))
+ {
+ if (G_VALUE_HOLDS_INT (&event->any_data))
+ {
+ event->source->role = g_value_get_int (&event->any_data);
+ _atspi_accessible_add_cache (event->source, ATSPI_CACHE_ROLE);
+ }
+ else
+ {
+ event->source->cached_properties &= ~ATSPI_CACHE_ROLE;
+ }
+ }
}
static void