From 51c324f9fa0961b64cd1137d58ed2466eaf1dd54 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 8 Jan 2015 00:02:11 +0100 Subject: [PATCH] sdl2: deactivate finger motion, as the coordinate are 0, 0 on OSX, and finger doesnt seem triggered on others platforms. We will find a proper solution later. --- kivy/core/window/window_sdl2.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py index a8e852858..fca519a0d 100644 --- a/kivy/core/window/window_sdl2.py +++ b/kivy/core/window/window_sdl2.py @@ -261,9 +261,15 @@ class WindowSDL(WindowBase): elif action in ('fingermotion', 'fingerdown', 'fingerup'): # for finger, pass the raw event to SDL motion event provider - SDL2MotionEventProvider.q.appendleft(event) + # XXX this is problematic. On OSX, it generates touches with 0, + # 0 coordinates, at the same times as mouse. But it works. + # We have a conflict of using either the mouse or the finger. + # Right now, we have no mechanism that we could use to know + # which is the preferred one for the application. + #SDL2MotionEventProvider.q.appendleft(event) + pass - if action == 'mousemotion': + elif action == 'mousemotion': x, y = args self.mouse_pos = x, self.system_size[1] - y self._mouse_x = x