Enable caching on a call to atspi_accessible_set_cache_mask
authorMike Gorse <mgorse@novell.com>
Mon, 5 Mar 2012 23:32:32 +0000 (17:32 -0600)
committerMike Gorse <mgorse@novell.com>
Mon, 5 Mar 2012 23:32:32 +0000 (17:32 -0600)
commitd6bf707a6932c7506c18a98bbe18148ff8a2de30
tree24fdac1de50eeefb89e7ba6720774720ddfb60a1
parent502a31822dbe1b548eb95e30165a23b109dc1eaa
Enable caching on a call to atspi_accessible_set_cache_mask

Previously, caching was always disabled unless atspi_event_main() was
called to start a main loop, since we need to handle the case of a
simple application/script that performs an action and then sleeps rather
than entering a main loop. In such a case, libatspi will not be able to
detect that an event has been fired to update the cache, so caching
should be disabled. However, an application may want to start a main
loop through some other mechanism than by calling atspi-event_main(),
and caching should be done in such a case. So we'll assume that, if
atspi_accessible_set_cache_mask is called, then the application expects
caching to work and will run a main loop one way or another. Note that
it is possible for a script to run a main loop in some instances but not
others, and, in such a case, if it is not using atspi_event_main(), then
it should set caching to ATSPI_CACHE_NONE when not in a main loop and
back to ATSPI_CACHE_DEFAULT when running a main loop.
atspi/atspi-accessible.c