[orca] Work around missing object:state-changed:focused event from GtkTable
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Work around missing object:state-changed:focused event from GtkTable
- Date: Thu, 21 Nov 2019 16:36:07 +0000 (UTC)
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]