[orca] Return early if the mouse moved again before we start presentation



commit 965649d034b8e97daa90a11bca545e85e6dc62da
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Jul 8 15:47:54 2019 -0400

    Return early if the mouse moved again before we start presentation

 src/orca/mouse_review.py | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index b3034123c..1a51d2cb7 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -442,6 +442,12 @@ class MouseReviewer:
             isRow = lambda x: x and x.getRole() == pyatspi.ROLE_TABLE_ROW
             obj = pyatspi.findAncestor(obj, isRow) or obj
 
+        screen, nowX, nowY = self._pointer.get_position()
+        if (pX, pY) != (nowX, nowY):
+            msg = "MOUSE REVIEW: Pointer moved again: (%i, %i)" % (nowX, nowY)
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return
+
         new = _ItemContext(pX, pY, obj, window, script)
         if new.present(self._currentMouseOver):
             self._currentMouseOver = new


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