Wrong coordinates iMac retina

36 views
Skip to first unread message

gear48

unread,
Jun 7, 2016, 4:17:56 AM6/7/16
to Kivy users support
Hi
I work with Kivy on mac os ElCapitan
I have two mac: one old macbook pro (1920,1200) and one iMac retina (5120,2880)

I have a problème with Scatter and the multitouch

I follow the video on pythonmobile.blogspot about Scatter
I join you the 2 files

The files run correctly on mac book pro

On Imac
A red dot appear in the middle of point (0,0) and point of my right click

As I lose the point of my click it 's impossible to remove this red doc with a left  click



Can you help me
Regards
scatter2.py
MonApplicationDeformation.kv

Bill Janssen

unread,
Jun 29, 2016, 1:51:06 PM6/29/16
to Kivy users support
The retina support does not seem to be working properly.  I think the problem is that in kivy/core/window/_window_sdl2.pyx, setup_window(), the SDL_WINDOW_ALLOW_HIGHDPI flag should only be set in the USE_IOS branch, not in the main branch.

Thomas Chen

unread,
Jul 3, 2016, 1:36:00 AM7/3/16
to Kivy users support
I intercept all my touch events and transform the coordinates when I'm on a retina screen using this:

    @property
   
def mouse_pos(self):
       
if self.retina:
           
return [xy * 2 for xy in Window.mouse_pos]
       
else:
           
return Window.mouse_pos


If I define this property on widgets that need to handle touch then I set self.retina=True using a my kivy.ini file. It's not ideal, but it lets me continue working until a fix is added to the official distribution.

On Tuesday, June 7, 2016 at 1:17:56 AM UTC-7, gear48 wrote:

Alexander Taylor

unread,
Jul 3, 2016, 10:52:21 AM7/3/16
to Kivy users support
I think this may have been fixed in master.
Reply all
Reply to author
Forward
0 new messages