[orca] Return early when generating new ancestors for frames and windows
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Return early when generating new ancestors for frames and windows
- Date: Tue, 24 Apr 2018 14:40:27 +0000 (UTC)
commit b29672f36e222a3e0b3b508b7808f05af9e4e9e6
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Apr 24 10:39:37 2018 -0400
Return early when generating new ancestors for frames and windows
src/orca/speech_generator.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index c7583f9..69b08ce 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1831,8 +1831,12 @@ class SpeechGenerator(generator.Generator):
if priorObj == obj:
return []
+ role = args.get('role', obj.getRole())
+ if role in [pyatspi.ROLE_FRAME, pyatspi.ROLE_WINDOW]:
+ return []
+
result = []
- if obj.getRole() == pyatspi.ROLE_MENU_ITEM \
+ if role == pyatspi.ROLE_MENU_ITEM \
and (not priorObj or priorObj.getRole() == pyatspi.ROLE_WINDOW):
return result
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]