From 0cc176bb88bdc46d769902eccf72bd7eba82c8d4 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Fri, 13 Feb 2015 18:35:50 +0100 Subject: [PATCH] sdl2: the size returned by setup_window mandate the one we try to set. When running on mobile or constrained env, the OS can force the size of the final window. Plus, due to synced struct from latest SDL2 stable, x, y are not integer but float. No need to divide now. --- kivy/core/window/window_sdl2.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py index cfcbe44fa..06b5d345e 100644 --- a/kivy/core/window/window_sdl2.py +++ b/kivy/core/window/window_sdl2.py @@ -77,8 +77,7 @@ class SDL2MotionEventProvider(MotionEventProvider): return action, fid, x, y = value - x = x / 32768. - y = 1 - (y / 32768.) + y = 1 - y if fid not in touchmap: touchmap[fid] = me = SDL2MotionEvent('sdl', fid, (x, y)) else: @@ -143,7 +142,7 @@ class WindowSDL(WindowBase): # setup ! w, h = self._size resizable = Config.getboolean('graphics', 'resizable') - gl_size = self._win.setup_window(pos[0], pos[1], w, h, + self._size = self._win.setup_window(pos[0], pos[1], w, h, self.borderless, self.fullscreen, resizable) # never stay with a None pos, application using w.center