parent
82e88b54c7
commit
61a77e19ef
10
glfw/x11_init.c
vendored
10
glfw/x11_init.c
vendored
@ -433,12 +433,10 @@ static bool initExtensions(void)
|
|||||||
//
|
//
|
||||||
void _glfwGetSystemContentScaleX11(float* xscale, float* yscale, bool bypass_cache)
|
void _glfwGetSystemContentScaleX11(float* xscale, float* yscale, bool bypass_cache)
|
||||||
{
|
{
|
||||||
// NOTE: Default to the display-wide DPI as we don't currently have a policy
|
// Start by assuming the default X11 DPI
|
||||||
// for which monitor a window is considered to be on
|
// NOTE: Some desktop environments (KDE) may remove the Xft.dpi field when it
|
||||||
float xdpi = DisplayWidth(_glfw.x11.display, _glfw.x11.screen) *
|
// would be set to 96, so assume that is the case if we cannot find it
|
||||||
25.4f / DisplayWidthMM(_glfw.x11.display, _glfw.x11.screen);
|
float xdpi = 96.f, ydpi = 96.f;
|
||||||
float ydpi = DisplayHeight(_glfw.x11.display, _glfw.x11.screen) *
|
|
||||||
25.4f / DisplayHeightMM(_glfw.x11.display, _glfw.x11.screen);
|
|
||||||
|
|
||||||
// NOTE: Basing the scale on Xft.dpi where available should provide the most
|
// NOTE: Basing the scale on Xft.dpi where available should provide the most
|
||||||
// consistent user experience (matches Qt, Gtk, etc), although not
|
// consistent user experience (matches Qt, Gtk, etc), although not
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user