[orca/gnome-3-12] Handle yet another case of missing object:state-changed:focused events for Gtk+



commit fe2b2c5d6822cad66eb6bf0db4b1f9cede22eb91
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Mar 21 15:14:00 2014 -0400

    Handle yet another case of missing object:state-changed:focused events for Gtk+

 src/orca/scripts/toolkits/gtk/script.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index 2316cdd..8ba4ece 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -120,6 +120,12 @@ class Script(default.Script):
             orca.setLocusOfFocus(event, event.source)
             return
 
+        # Unfiled. Happens in Evolution, but for what seems to be a generic
+        # Gtk+ toggle button. So we'll handle it here.
+        if role == pyatspi.ROLE_TOGGLE_BUTTON:
+            orca.setLocusOfFocus(event, event.source)
+            return
+
         # Unfiled. But this happens when you are in Gedit, get into a menu
         # and then press Escape. The text widget emits a focus: event, but
         # not a state-changed:focused event.


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