GNOME Bugzilla – Bug 450760
gdk_screen_get_resolution returns -1 on Windows
Last modified: 2015-06-21 01:49:47 UTC
A resonable default value for the screen resolution could be retreived by using this code <http://blogs.msdn.com/oldnewthing/archive/2004/07/14/182971.aspx>: int GetScreenDPI() { HDC hdcScreen = GetDC(NULL); int iDPI = -1; // assume failure if (hdcScreen) { iDPI = GetDeviceCaps(hdcScreen, LOGPIXELSX); ReleaseDC(NULL, hdcScreen); } return iDPI; } The routine could be injected into gtksettings.c - similiar to the code for the X11 backend.
Bah, obviously bed time.
This bug was fixed in commit https://git.gnome.org/browse/gtk+/commit/?id=f38498ed841f6e63b1904e92be48c9f5f429bd31