[orca] Handle yet another focus: only situation in Gtk+
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle yet another focus: only situation in Gtk+
- Date: Sun, 24 Nov 2013 16:19:20 +0000 (UTC)
commit d40bf9b720ba19b0654b4cea35f579b7cfda52eb
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Nov 24 11:18:58 2013 -0500
Handle yet another focus: only situation in Gtk+
src/orca/scripts/toolkits/GAIL/script.py | 7 +++++++
src/orca/scripts/toolkits/gtk/script.py | 7 +++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/GAIL/script.py b/src/orca/scripts/toolkits/GAIL/script.py
index 08bc39c..722c4d2 100644
--- a/src/orca/scripts/toolkits/GAIL/script.py
+++ b/src/orca/scripts/toolkits/GAIL/script.py
@@ -52,3 +52,10 @@ class Script(default.Script):
# focus, such as in the old gnome-screensaver dialog.
if role in [pyatspi.ROLE_TEXT, pyatspi.ROLE_PASSWORD_TEXT]:
orca.setLocusOfFocus(event, event.source)
+
+ # Unfiled. When a context menu first appears and an item is already
+ # selected, we get a focus: event for that menu item, but there is
+ # not a state-changed event for that item, nor a selection-changed
+ # event for the menu.
+ if role == pyatspi.ROLE_MENU_ITEM:
+ orca.setLocusOfFocus(event, event.source)
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index 500da92..779dbcb 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -79,3 +79,10 @@ class Script(default.Script):
# focus, such as in the old gnome-screensaver dialog.
if role in [pyatspi.ROLE_TEXT, pyatspi.ROLE_PASSWORD_TEXT]:
orca.setLocusOfFocus(event, event.source)
+
+ # Unfiled. When a context menu first appears and an item is already
+ # selected, we get a focus: event for that menu item, but there is
+ # not a state-changed event for that item, nor a selection-changed
+ # event for the menu.
+ if role == pyatspi.ROLE_MENU_ITEM:
+ orca.setLocusOfFocus(event, event.source)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]