GNOME Bugzilla – Bug 503091
pyatspi getApplication doesn't fallback properly
Last modified: 2019-03-27 20:11:43 UTC
There is code in pyatspi's accessible.py:getApplication to fallback to walking up the hierarchy if the actual getApplication doesn't work. The problem is that some toolkits (e.g., Java) don't implement this method, and return None. As such, the current code to walk up the hierarchy never gets called. A second problem is that if the code to walk up the hierarchy does get called, it returns an object that is an Accessible and not an Application. Patch to follow...
Created attachment 100773 [details] [review] Patch to walk the hierarchy if the real getAccessible fails or returns None. Also narrows the return value to an Application. This patch seems to work nicely for me with the Java platform.
It looks fine to me. Yo.
Committed. Thanks!
(In reply to comment #3) > Committed. Thanks! > I was checking my pyatspi directory today, and apparently my commit didn't work. So, I just committed it for the GNOME 2.21.5 release.