[orca/gnome-3-34] Work around missing object:state-changed:focused event from GtkTable



commit 0097f358f04693f080701813156a8abe5a91d4ca
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 b3e32c016..ec3de6339 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -131,6 +131,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]