[orca] Do a focus grab rather than use the activate action for left click
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Do a focus grab rather than use the activate action for left click
- Date: Fri, 28 Jun 2019 17:54:43 +0000 (UTC)
commit 214b1130780dd0cd1c6074b324488d4df9680964
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Jun 28 13:53:23 2019 -0400
Do a focus grab rather than use the activate action for left click
Activate functions more like a double-click.
src/orca/eventsynthesizer.py | 10 ++++++++++
src/orca/scripts/default.py | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/eventsynthesizer.py b/src/orca/eventsynthesizer.py
index 1b2f59990..d550525c0 100644
--- a/src/orca/eventsynthesizer.py
+++ b/src/orca/eventsynthesizer.py
@@ -308,3 +308,13 @@ def clickActionOn(obj):
def pressActionOn(obj):
return _performNamedAction(obj, "press")
+
+def grabFocusOn(obj):
+ try:
+ component = obj.queryComponent()
+ except:
+ msg = "ERROR: Exception querying component of %s" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
+ return component.grabFocus()
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index d5267e7ad..848719c21 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -1313,7 +1313,7 @@ class Script(script.Script):
return True
if eventsynthesizer.pressActionOn(obj):
return True
- if eventsynthesizer.activateActionOn(obj):
+ if eventsynthesizer.grabFocusOn(obj):
return True
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]