[orca] Ensure items below the menu bar are not on the same review line as the menus



commit bab96c9559253525d513ac49bd06b01bcad6ff5b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jul 27 23:59:31 2016 -0400

    Ensure items below the menu bar are not on the same review line as the menus

 src/orca/flat_review.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/flat_review.py b/src/orca/flat_review.py
index 741e4eb..f417b78 100644
--- a/src/orca/flat_review.py
+++ b/src/orca/flat_review.py
@@ -211,6 +211,15 @@ class Zone:
         """Returns True if this Zone is on the same horiztonal line as
         the given zone."""
 
+        try:
+            thisParentRole = self.accessible.parent.getRole()
+            zoneParentRole = zone.accessible.parent.getRole()
+        except:
+            pass
+        else:
+            if pyatspi.ROLE_MENU_BAR in [thisParentRole, zoneParentRole]:
+                return self.accessible.parent == zone.accessible.parent
+
         highestBottom = min(self.y + self.height, zone.y + zone.height)
         lowestTop     = max(self.y,               zone.y)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]