[orca] Don't treat stale mouseover objects as the current item
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't treat stale mouseover objects as the current item
- Date: Fri, 29 Jun 2018 01:11:08 +0000 (UTC)
commit 3edcf29c5662b30348354fd7cdd5f4f082649dc0
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Jun 28 21:09:59 2018 -0400
Don't treat stale mouseover objects as the current item
src/orca/mouse_review.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index 161a8f83d..50aa9fca2 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -177,6 +177,11 @@ class _ItemContext:
return self._obj
+ def getTime(self):
+ """Returns the time associated with this context."""
+
+ return self._time
+
def present(self, prior):
"""Presents this context to the user."""
@@ -259,7 +264,14 @@ class MouseReviewer:
if not _mouseReviewCapable:
return None
- return self._currentMouseOver.getObject()
+ obj = self._currentMouseOver.getObject()
+
+ if time.time() - self._currentMouseOver.getTime() > 0.1:
+ msg = "MOUSE REVIEW: Treating %s as stale" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return None
+
+ return obj
def toggle(self, script=None, event=None):
"""Toggle mouse reviewing on or off."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]