Re: [g-a-devel] pyatspi Registry does not refresh in gnome 3
- From: Mike Gorse <mgorse alum wpi edu>
- To: Nischal Rao <rao nischal gmail com>
- Cc: gnome-accessibility-devel gnome org
- Subject: Re: [g-a-devel] pyatspi Registry does not refresh in gnome 3
- Date: Sun, 22 May 2011 22:34:40 -0400 (EDT)
Hi Nischal,
This sounds like a caching issue, as Trevor suggested; AT-SPI2 caches more
aggressively than AT-SPI-CORBA in order to compensate for D-Bus calls
being somewhat slow. So there are a few issues:
- If an application doesn't send events when an object's name,
description, children, or state change, then the cache can get out of
synch. There is an API (setCacheMask in pyatspi2) that is supposed to
allow an AT to determine what does and doesn't get cached, in order to
make it possible to work around toolkits not always sending the expected
events, but there were several issues with it. I've just committed some
changes/fixes to it that will go into the release tomorrow. So you could
run something like
app.setCacheMask (pyatspi.cache.ALL ^ pyatspi.cache.STATE)
to prevent state sets from being cached for a given application, where
"app" is a root accessible for the given application. Or:
pyatspi.Registry.getDesktop(0).setCacheMask (pyatspi.cache.NONE)
to disable caching altogether.
- Additionally, libatspi currently does not report to the registry that it
cares about StateChanged/PropertyChange/ChildrenChanged signals even
though it listens for them to maintain its cache, so at-spi2-atk would not
send them if the AT was not explicitly listening for them. I pushed a
change to at-spi2-atk earlier today to make it always send these events,
although I don't consider this ideal and would like to rework that logic
for 2.2.
- If a pyatspi script does not call registry.start() but instead calls
sleep() or similar while waiting for user interaction, then it will not
see any events and the cache will get out of synch. I'll try to fix this
before tomorrow's release; currently you'll need to disable caching as
described above when using such a script.
-Mike
On Sun, 22 May 2011, Nischal Rao wrote:
Hi,
I am trying to use the pyatspi2 in Gnome 3 for an application and found an issue in at-spi2 that doesn't seem to exist in at-spi.
I noticed that the state of a node in the at-spi tree is not refreshed when its state changes. Is there some kind of caching going on?
Is there a way to refresh the at-spi2 registry?
--
Best Regards,
Nischal E Rao
Download VEDICS @ http://vedics.sourceforge.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]