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

In x11, GetDisplayDPI can give incorrect or unusable DPI information.… #4220

Merged
merged 2 commits into from
Jun 1, 2021

Conversation

schkillten
Copy link
Contributor

Adding call to X11 XGetDefault to retrieve the xft dpi and using that as the dpi value if it's available.

Description

The X11 implementation of GetDisplayDPI currently returns the physical dpi and in some cases the incorrect dpi. This happens if the xrandr extension is used. Using XGetDefault will give us the xft dpi when available which is the useful virtual dpi and would allow users to determine what the scale factor is and possibly use features like hidpi.

Existing Issue(s)

This could be helpful for issues such as #4176

… Using XGetDefaults to get the Xft DPI if it's available and returning that. This could allow you to figure out DPI scale.
… without having to do an unnecessary conversion. Then do explicit conversions later on if we need.
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

Successfully merging this pull request may close these issues.

3 participants