From f747e0d6cb1a7835ccc46fce8c09f2e1b9c5c5c8 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Fri, 10 Aug 2012 11:17:54 +0200 Subject: [PATCH] mouse: fix ghost touch that can appear on window (due to a race condition between mousemotion / mouserelease). closes #621 --- kivy/input/providers/mouse.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kivy/input/providers/mouse.py b/kivy/input/providers/mouse.py index bb9c45da3..241db2e7d 100644 --- a/kivy/input/providers/mouse.py +++ b/kivy/input/providers/mouse.py @@ -206,10 +206,7 @@ class MouseMotionEventProvider(MotionEventProvider): self.remove_touch(cur) self.current_drag = None - width, height = EventLoop.window.system_size - rx = x / float(width) - ry = 1. - y / float(height) - cur = self.find_touch(rx, ry) + cur = self.current_drag if (button in ('left', 'scrollup', 'scrolldown') or self.disable_multitouch) and cur and not ('ctrl' in modifiers): self.remove_touch(cur)