[orca] Minimize context presented during mouse review
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Minimize context presented during mouse review
- Date: Tue, 26 Jun 2018 20:22:44 +0000 (UTC)
commit b7eec07de590abdd86ad4482678a2fcd205aff3d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Jun 26 16:18:53 2018 -0400
Minimize context presented during mouse review
src/orca/mouse_review.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index 2c6669806..4caaedb66 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -154,6 +154,14 @@ class _ItemContext:
return _StringContext(self._obj, self._script, string, start, end)
+ def _getContainer(self):
+ roles = [pyatspi.ROLE_DIALOG,
+ pyatspi.ROLE_FRAME,
+ pyatspi.ROLE_PAGE_TAB,
+ pyatspi.ROLE_WINDOW]
+ isContainer = lambda x: x and x.getRole() in roles
+ return pyatspi.findAncestor(self._obj, isContainer)
+
def present(self, prior):
"""Presents this context to the user."""
@@ -173,7 +181,8 @@ class _ItemContext:
return True
if self._obj and self._obj != prior._obj:
- self._script.presentObject(self._obj)
+ priorObj = prior._obj or self._getContainer()
+ self._script.presentObject(self._obj, priorObj=priorObj)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]