[orca] Add utility to check if an event is coming from the locusOfFocus doc
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add utility to check if an event is coming from the locusOfFocus doc
- Date: Fri, 8 Feb 2019 16:55:30 +0000 (UTC)
commit 1c0893f100862e1da5a9c6b93b0b90d8393b4697
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Feb 8 11:54:35 2019 -0500
Add utility to check if an event is coming from the locusOfFocus doc
src/orca/scripts/web/script_utilities.py | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 9e26d22a0..1d5da8fa6 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3199,6 +3199,14 @@ class Utilities(script_utilities.Utilities):
return True
+ def eventIsFromLocusOfFocusDocument(self, event):
+ source = self.getDocumentForObject(event.source)
+ focus = self.getDocumentForObject(orca_state.locusOfFocus)
+ rv = source and focus and source == focus
+ msg = "WEB: Event doc %s is same as focus doc %s: %s" % (source, focus, rv)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return rv
+
def textEventIsDueToInsertion(self, event):
if not event.type.startswith("object:text-"):
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]