[orca] Work around more brokenness coming from Gecko apps with Gtk+ 3 dialogs



commit 47883e17ccbfffd54eb36041c2e62ad647e92b3d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Mar 21 07:46:32 2017 -0400

    Work around more brokenness coming from Gecko apps with Gtk+ 3 dialogs

 src/orca/event_manager.py                 |    1 -
 src/orca/scripts/toolkits/Gecko/script.py |   10 ++++++++++
 src/orca/scripts/web/script.py            |   10 ++++++++++
 3 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 89f767e..dbf5ab8 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -549,7 +549,6 @@ class EventManager:
             debug.println(debug.LEVEL_WARNING, msg, True)
         else:
             skipCheck = [
-                "object:active-descendant-changed",
                 "object:children-changed",
                 "object:column-reordered",
                 "object:row-reordered",
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 938f290..0b3285a 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -86,6 +86,16 @@ class Script(web.Script):
         debug.println(debug.LEVEL_INFO, msg, True)
         default.Script.onActiveChanged(self, event)
 
+    def onActiveDescendantChanged(self, event):
+        """Callback for object:active-descendant-changed accessibility events."""
+
+        if super().onActiveDescendantChanged(event):
+            return
+
+        msg = "GECKO: Passing along event to default script"
+        debug.println(debug.LEVEL_INFO, msg, True)
+        default.Script.onActiveDescendantChanged(self, event)
+
     def onBusyChanged(self, event):
         """Callback for object:state-changed:busy accessibility events."""
 
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index df337c6..b122557 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1171,6 +1171,16 @@ class Script(default.Script):
 
         return False
 
+    def onActiveDescendantChanged(self, event):
+        """Callback for object:active-descendant-changed accessibility events."""
+
+        if not self.utilities.inDocumentContent(event.source):
+            msg = "WEB: Event source is not in document content"
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return False
+
+        return True
+
     def onBusyChanged(self, event):
         """Callback for object:state-changed:busy accessibility events."""
 


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