[orca] Hack around Gtk+ bug 759736



commit 025bd9a7063d54dc22de3b93038ebedaac774a17
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Dec 21 09:13:46 2015 -0500

    Hack around Gtk+ bug 759736
    
    Fixes in Orca uncovered this Gtk+ bug, introducing what seems like a
    regression. So we'll work around it until it's properly fixed in Gtk+.

 src/orca/scripts/toolkits/gtk/script_utilities.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/gtk/script_utilities.py 
b/src/orca/scripts/toolkits/gtk/script_utilities.py
index 593d7e4..6d2899e 100644
--- a/src/orca/scripts/toolkits/gtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/gtk/script_utilities.py
@@ -28,6 +28,7 @@ __license__   = "LGPL"
 import pyatspi
 import re
 
+import orca.debug as debug
 import orca.script_utilities as script_utilities
 
 class Utilities(script_utilities.Utilities):
@@ -104,3 +105,12 @@ class Utilities(script_utilities.Utilities):
         red, green, blue = string.split(",")
 
         return int(red) >> 8, int(green) >> 8, int(blue) >> 8
+
+    def isZombie(self, obj):
+        rv = super().isZombie(obj)
+        if rv and self.isLink(obj) and obj.getIndexInParent() == -1:
+            msg = 'INFO: Hacking around bug 759736 for %s' % obj
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return False
+
+        return rv


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