[orca] Clear web script command state when window deactivated
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Clear web script command state when window deactivated
- Date: Fri, 26 Jun 2015 22:51:08 +0000 (UTC)
commit d181564f19a70a77e05f1d79025a09e8a22e9292
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Jun 26 18:50:19 2015 -0400
Clear web script command state when window deactivated
src/orca/scripts/toolkits/Gecko/script.py | 10 ++++++++++
src/orca/scripts/web/script.py | 10 ++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 56c8c1b..3566e91 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -251,6 +251,16 @@ class Script(web.Script):
debug.println(debug.LEVEL_INFO, msg)
default.Script.onTextSelectionChanged(self, event)
+ def onWindowDeactivated(self, event):
+ """Callback for window:deactivate accessibility events."""
+
+ if super().onWindowDeactivated(event):
+ return
+
+ msg = "GECKO: Passing along event to default script"
+ debug.println(debug.LEVEL_INFO, msg)
+ default.Script.onWindowDeactivated(self, event)
+
def handleProgressBarUpdate(self, event, obj):
"""Determine whether this progress bar event should be spoken or not.
For Firefox, we don't want to speak the small "page load" progress
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 296a127..947cf95 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1534,3 +1534,13 @@ class Script(default.Script):
return True
return False
+
+ def onWindowDeactivated(self, event):
+ """Callback for window:deactivate accessibility events."""
+
+ msg = "WEB: Clearing command state"
+ debug.println(debug.LEVEL_INFO, msg)
+ self._lastCommandWasCaretNav = False
+ self._lastCommandWasStructNav = False
+ self._lastCommandWasMouseButton = False
+ return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]