[orca] Ensure we present newly-focused widget when current widget gets destroyed
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Ensure we present newly-focused widget when current widget gets destroyed
- Date: Wed, 24 Apr 2019 17:44:48 +0000 (UTC)
commit 5a32454edc18b2beada606f0789852f89e4b5497
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Apr 24 13:43:26 2019 -0400
Ensure we present newly-focused widget when current widget gets destroyed
src/orca/scripts/toolkits/Gecko/script_utilities.py | 2 +-
src/orca/scripts/web/script.py | 3 ++-
src/orca/speech_generator.py | 3 +++
3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script_utilities.py
b/src/orca/scripts/toolkits/Gecko/script_utilities.py
index 51e6a8f3f..e93fa25cb 100644
--- a/src/orca/scripts/toolkits/Gecko/script_utilities.py
+++ b/src/orca/scripts/toolkits/Gecko/script_utilities.py
@@ -77,7 +77,7 @@ class Utilities(web.Utilities):
the object attribute 'level'. To be consistent with the default
nodeLevel() this value is 0-based (Gecko return is 1-based) """
- if obj is None or obj.getRole() == pyatspi.ROLE_HEADING \
+ if obj is None or self.isDead(obj) or obj.getRole() == pyatspi.ROLE_HEADING \
or (obj.parent and obj.parent.getRole() == pyatspi.ROLE_MENU):
return -1
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index d5ef10d6e..72de5a677 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1746,7 +1746,8 @@ class Script(default.Script):
obj, offset = self.utilities.searchForCaretContext(event.source)
if obj:
- notify = self.utilities.inFindToolbar(orca_state.locusOfFocus)
+ notify = self.utilities.inFindToolbar(orca_state.locusOfFocus) \
+ or self.utilities.isFocusModeWidget(obj)
msg = "WEB: Updating focus and context to %s, %i" % (obj, offset)
debug.println(debug.LEVEL_INFO, msg, True)
orca.setLocusOfFocus(event, obj, notify)
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 737207664..b1583192c 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1707,6 +1707,9 @@ class SpeechGenerator(generator.Generator):
else:
priorObj = args.get('priorObj')
+ if priorObj and self._script.utilities.isDead(priorObj):
+ return []
+
if priorObj and priorObj.getRole() == pyatspi.ROLE_TOOL_TIP:
return []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]