[orca] Don't treat text insertions from non-focused widgets as echoable
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't treat text insertions from non-focused widgets as echoable
- Date: Tue, 5 Nov 2019 17:27:33 +0000 (UTC)
commit c1837c883c6676fd2ed2767d3584efad9bf2ea40
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Nov 5 12:27:02 2019 -0500
Don't treat text insertions from non-focused widgets as echoable
src/orca/script_utilities.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 11b57a03b..241d1621a 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -5107,8 +5107,14 @@ class Utilities:
try:
role = event.source.getRole()
+ state = event.source.getState()
except:
- msg = "ERROR: Exception getting role of %s" % event.source
+ msg = "ERROR: Exception getting role and state of %s" % event.source
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
+ if not state.contains(pyatspi.STATE_FOCUSED):
+ msg = "INFO: Not echoable text insertion event: source is not focused"
debug.println(debug.LEVEL_INFO, msg, True)
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]