Fix GHOST crash on X11 with recent DPI changes on some systems.

This commit is contained in:
Brecht Van Lommel
2017-03-25 19:29:37 +01:00
parent fe3fb23697
commit 393efccb19

View File

@@ -1683,6 +1683,7 @@ getDPIHint()
{
/* Try to read DPI setting set using xrdb */
char* resMan = XResourceManagerString(m_display);
if (resMan) {
XrmDatabase xrdb = XrmGetStringDatabase(resMan);
if (xrdb) {
char* type = NULL;
@@ -1695,6 +1696,7 @@ getDPIHint()
}
}
}
}
/* Fallback to calculating DPI using X reported DPI, set using xrandr --dpi */
XWindowAttributes attr;