xpra icon
Bug tracker and wiki

Opened 15 months ago

Last modified 8 weeks ago

#1933 assigned task

hidpi awareness for macos

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 4.0
Component: platforms Version: 2.3.x
Keywords: Cc:

Change History (3)

comment:1 Changed 14 months ago by Antoine Martin

Description: modified (diff)
Status: newassigned

It might be possible to paint at higher resolution through opengl.
In which case the fix would simply be to scale window positions and dimensions when dealing with GTK, but keep the opengl window backing at the "native" resolution.

comment:2 Changed 3 months ago by Antoine Martin

Milestone: future4.0

It may be possible to enable HIDPI mode for testing - though this may require newer versions of macos:

The API to call with opengl seems to be Optimizing OpenGL for High Resolution: setWantsBestResolutionOpenGLSurface.
The main difficulty with this is that we would need to use double screen dimensions (or whatever ratio is used) when connecting to the server but then downscale the coordinates for all window operations except for opengl painting.

Another difficulty is to do with how we obtain the opengl context: we initialize it without the window (which may be the cause of some problems: r23441 / #2372), so by the time we have the NSView object it may be too late to call setWantsBestResolutionOpenGLSurface. Not sure how we would go about selecting pixel format attributes if we did it that way - not that we currently support high bit depth anyway..

Example code: PyOpenGL on a Macbook retina display

comment:3 Changed 8 weeks ago by Antoine Martin

See also #2410

Note: See TracTickets for help on using tickets.