After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725754 - Fix font size when gdk_x11_display_set_window_scale() is used
Fix font size when gdk_x11_display_set_window_scale() is used
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-03-05 20:48 UTC by Owen Taylor
Modified: 2014-03-07 04:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix font size when gdk_x11_display_set_window_scale() is used (2.87 KB, patch)
2014-03-05 20:48 UTC, Owen Taylor
committed Details | Review
Test case (383 bytes, text/x-csrc)
2014-03-05 20:52 UTC, Owen Taylor
  Details

Description Owen Taylor 2014-03-05 20:48:16 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.
Comment 1 Owen Taylor 2014-03-05 20:48:18 UTC
Created attachment 271034 [details] [review]
Fix font size when gdk_x11_display_set_window_scale() is used
Comment 2 Owen Taylor 2014-03-05 20:52:40 UTC
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
Comment 3 Matthias Clasen 2014-03-06 10:56:31 UTC
Review of attachment 271034 [details] [review]:

ok
Comment 4 Matthias Clasen 2014-03-07 04:20:40 UTC
Attachment 271034 [details] pushed as 99ac2f5 - Fix font size when gdk_x11_display_set_window_scale() is used