From 294d01def692482aefae3c66fd392acc626f2e78 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 25 Feb 2020 21:20:41 +0530 Subject: [PATCH] Clear the click queue before a multi-click --- kitty_tests/mouse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty_tests/mouse.py b/kitty_tests/mouse.py index 22b75e6e7..2c31f67c5 100644 --- a/kitty_tests/mouse.py +++ b/kitty_tests/mouse.py @@ -74,9 +74,11 @@ def move(x=0, y=0, button=-1, q=None): self.ae(s, q, '{!r} != {!r} after movement to x={} y={}'.format(s, q, x, y)) def multi_click(x=0, y=0, count=2): + clear_click_queue = True while count > 0: count -= 1 - ev(GLFW_MOUSE_BUTTON_LEFT, x=x, y=y) + ev(GLFW_MOUSE_BUTTON_LEFT, x=x, y=y, clear_click_queue=clear_click_queue) + clear_click_queue = False def scroll(x=0, y=0, up=True): move(x=x, y=y, button=-2 if up else -3)