INRIA / INRIA/libpointing

Incorrect display size for non-apple external monitors on macOS

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
54
Forks
14
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.