[orca] Make finding clickables more performant
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Make finding clickables more performant
- Date: Tue, 23 Jul 2019 17:48:09 +0000 (UTC)
commit 54946aec28871413f60ce6e2d75715e9c565b4ae
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Jul 23 13:47:05 2019 -0400
Make finding clickables more performant
src/orca/structural_navigation.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index dee3e7796..2ede1fa45 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -69,7 +69,7 @@ class MatchCriteria:
matchObjAttrs = None,
roles = [],
matchRoles = None,
- interfaces = "",
+ interfaces = [],
matchInterfaces = None,
invert = False,
applyPredicate = False):
@@ -3260,10 +3260,16 @@ class StructuralNavigation:
the criteria (e.g. the level of a heading).
"""
- # TODO - JD: At the moment, matching via interface crashes Orca.
- # Until that's addressed, we'll just use the predicate approach.
- # See https://bugzilla.gnome.org/show_bug.cgi?id=734805.
+ interfaces = ["action"]
+ interfaceMatch = collection.MATCH_ANY
+ state = [pyatspi.STATE_FOCUSABLE]
+ stateMatch = collection.MATCH_NONE
+
return MatchCriteria(collection,
+ states=state,
+ matchStates=stateMatch,
+ interfaces=interfaces,
+ matchInterfaces=interfaceMatch,
applyPredicate=True)
def _clickablePredicate(self, obj, arg=None):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]