rr- / screeninfo

Fetch location and size of physical screens.
Other
208 stars 36 forks source link

Improve macOS screen info reporting #75

Open florin-pop opened 1 year ago

florin-pop commented 1 year ago

The current version of screeninfo (0.8.1) was not reporting the screen size in mm of my monitor on macOS Ventura:

[Monitor(x=0, y=0, width=1920, height=1080, width_mm=None, height_mm=None, name=None, is_primary=True)]

This PR uses a different API on macOS to detect the monitor size in mm and scale (which is 2 or 3 for retina displays). The size in mm is used to calculate ppmm which can be converted to ppi for use in applications that require conversions from pixels to real world measurement units.