[orca] Work around missing object:state-changed:focused event from GtkTable



commit 13bfd7eddacf0d485a57f453caef5e2df3017189
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Nov 21 11:35:26 2019 -0500

    Work around missing object:state-changed:focused event from GtkTable

 src/orca/scripts/toolkits/gtk/script.py | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index 833d4f432..22921f4fa 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -117,6 +117,12 @@ class Script(default.Script):
            and not event.source.getState().contains(pyatspi.STATE_FOCUSED):
             return
 
+        if "Table" in pyatspi.listInterfaces(event.source):
+            selectedChildren = self.utilities.selectedChildren(event.source)
+            if selectedChildren:
+                orca.setLocusOfFocus(event, selectedChildren[0])
+                return
+
         ancestor = pyatspi.findAncestor(orca_state.locusOfFocus, lambda x: x == event.source)
         if not ancestor:
             orca.setLocusOfFocus(event, event.source)


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