[orca] Be more aggressive finding candidate descendants at point
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Be more aggressive finding candidate descendants at point
- Date: Sat, 30 Jun 2018 22:02:30 +0000 (UTC)
commit 5467f73be38a62e41898bfb4695a3fedf8a8f940
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Jun 30 18:01:47 2018 -0400
Be more aggressive finding candidate descendants at point
src/orca/script_utilities.py | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 084254e77..fff79b99a 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -3959,10 +3959,20 @@ class Utilities:
return cell
return child
+ candidates = []
for child in root:
obj = self.descendantAtPoint(child, x, y, coordType)
if obj:
return obj
+ if not self.containsPoint(child, x, y, coordType):
+ continue
+ if self.queryNonEmptyText(child):
+ string = child.queryText().getText(0, -1)
+ if re.search("[^\ufffc\s]", string):
+ candidates.append(child)
+
+ if len(candidates) == 1:
+ return candidates[0]
return None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]