GNOME Bugzilla – Bug 725754
Fix font size when gdk_x11_display_set_window_scale() is used
Last modified: 2014-03-07 04:20:44 UTC
We have a hack in the XSETTINGS code to substitute gtk-xft-dpi with gdk-unscaled-dpi unless the screen has a fixed window scale, in which case we just use gtk-xft-dpi. But if the screen is changed to have a fixed window scale, then the substituted value of gdk-unscaled-dpi will stick around until the next (coincidental) change to XSETTINGS. To fix this, force an immediate reread of the XSETTINGS property when gdk_x11_display_set_window_scale() is used.
Created attachment 271034 [details] [review] Fix font size when gdk_x11_display_set_window_scale() is used
Created attachment 271035 [details] Test case To see the bug under GNOME, do: gsettings set org.gnome.desktop.interface window-scale 2 Then run the attached program. It should come up the same font size as the rest of the desktop, but instead it has half-sized fonts. Making any change that affects XSETTINGS, like changing the double-click time in Mouse & Touchpad will make the fonts snap to the size of the rest of the desktop. gsettings set org.gnome.desktop.interface window-scale 0 To get back to auto-choosing
Review of attachment 271034 [details] [review]: ok
Attachment 271034 [details] pushed as 99ac2f5 - Fix font size when gdk_x11_display_set_window_scale() is used