[orca] Work around missing window-activate events from Gecko dialogs



commit 1d043139ca27a969f8abfaef080926cd5ada113a
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Mar 20 15:20:15 2017 -0400

    Work around missing window-activate events from Gecko dialogs

 src/orca/scripts/default.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 92c8ae6..2a74610 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2074,7 +2074,12 @@ class Script(script.Script):
     def onActiveChanged(self, event):
         """Callback for object:state-changed:active accessibility events."""
 
-        if event.source.getRole() == pyatspi.ROLE_FRAME:
+        frames = [pyatspi.ROLE_FRAME,
+                  pyatspi.ROLE_DIALOG,
+                  pyatspi.ROLE_FILE_CHOOSER,
+                  pyatspi.ROLE_COLOR_CHOOSER]
+
+        if event.source.getRole() in frames:
             if event.detail1 and not self.utilities.canBeActiveWindow(event.source):
                 return
 


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