Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect display size for non-apple external monitors on macOS #22

Open
m-damien opened this issue Dec 5, 2018 · 0 comments
Open

Incorrect display size for non-apple external monitors on macOS #22

m-damien opened this issue Dec 5, 2018 · 0 comments

Comments

@m-damien
Copy link
Collaborator

m-damien commented Dec 5, 2018

The display physical size returned by libpointing is incorrect on my external monitors (HP Compaq LA2205wg).

The problem seems to be coming from the native function "CGDisplayScreenSize", from the documentation :
"If Extended Display Identification Data (EDID) for the display device is not available, the size is estimated based on the device width and height in pixels from CGDisplayBounds, with an assumed resolution of 2.835 pixels/mm or 72 dpi, a reasonable guess for displays predating EDID support."

It seems to be what is happening because I obtain a DPI of 72 (instead of 86), but it should not be the case because my monitors have an EDID.
And I am able to retrieve the correct physical size by directly parsing the EDID of my monitors.
I wrote this code to compare the result obtained by parsing the EDID vs CGDisplayScreenSize :
https://gist.github.com/m-damien/75617b3eba1b125aac1be4af7444acad

I am on macOS Sierra.
The value returned by Qt using QScreen#logicalDotsPerInch is also incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant