[orca] Work around a missing state-changed event for Gtk+ table column headers



commit bcde8af9f991265bcc2706db288d8d1eaf87e02b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Dec 26 08:42:19 2013 -0500

    Work around a missing state-changed event for Gtk+ table column headers

 src/orca/scripts/toolkits/GAIL/script.py |    5 +++++
 src/orca/scripts/toolkits/gtk/script.py  |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/GAIL/script.py b/src/orca/scripts/toolkits/GAIL/script.py
index d6d269b..b224253 100644
--- a/src/orca/scripts/toolkits/GAIL/script.py
+++ b/src/orca/scripts/toolkits/GAIL/script.py
@@ -44,6 +44,11 @@ class Script(default.Script):
 
         role = event.source.getRole()
 
+        # https://bugzilla.gnome.org/show_bug.cgi?id=720987
+        if role == pyatspi.ROLE_TABLE_COLUMN_HEADER:
+            orca.setLocusOfFocus(event, event.source)
+            return
+
         # Unfiled. But this happens when you are in gtk-demo's application demo,
         # get into a menu and then press Escape. The text widget emits a focus:
         # event, but not a state-changed:focused event.
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index 9f3ef0a..a029c38 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -72,6 +72,11 @@ class Script(default.Script):
             orca.setLocusOfFocus(event, event.source)
             return
 
+        # https://bugzilla.gnome.org/show_bug.cgi?id=720987
+        if role == pyatspi.ROLE_TABLE_COLUMN_HEADER:
+            orca.setLocusOfFocus(event, event.source)
+            return
+
         # Unfiled, but a similar case of the above issue with combo boxes.
         if role == pyatspi.ROLE_PUSH_BUTTON:
             orca.setLocusOfFocus(event, event.source)


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