[orca] Check if the document is busy before fully processing children-changed events



commit 51f270b7942e174111b101f34ddbcef4b588377c
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Sep 27 08:25:59 2015 -0400

    Check if the document is busy before fully processing children-changed events

 src/orca/scripts/web/script.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index de89ea6..da807e8 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1275,6 +1275,17 @@ class Script(default.Script):
             debug.println(debug.LEVEL_INFO, msg)
             return True
 
+        try:
+            docIsBusy = document.getState().contains(pyatspi.STATE_BUSY)
+        except:
+            docIsBusy = False
+            msg = "WEB: Exception getting state of %s" % document
+            debug.println(debug.LEVEL_INFO, msg)
+        if docIsBusy:
+            msg = "WEB: Ignoring because %s is busy." % document
+            debug.println(debug.LEVEL_INFO, msg)
+            return True
+
         if not event.any_data or self.utilities.isZombie(event.any_data):
             msg = "WEB: Ignoring because any data is null or zombified."
             debug.println(debug.LEVEL_INFO, msg)


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