[gnome-shell] Fix text-scaling-factor under wayland.



commit e65d90d6241bf2ee0b1be4d0724f3425d2f6ecc4
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Oct 12 13:35:06 2015 -0400

    Fix text-scaling-factor under wayland.
    
    The text-scaling-factor GSetting was not being properly propagated
    to clutter and the Pango font map; under X this is done by Clutter,
    which listens to XSETTINGS directly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756447

 src/shell-global.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 188e898..3922467 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -867,7 +867,12 @@ update_scale_factor (GtkSettings *settings,
     {
       g_object_set (context, "scale-factor", g_value_get_int (&value), NULL);
       if (meta_is_wayland_compositor ())
-        g_object_set (clutter_settings_get_default (), "font-dpi", 96 * 1024 * g_value_get_int (&value), 
NULL);
+        {
+          int xft_dpi;
+          g_object_get (settings, "gtk-xft-dpi", &xft_dpi, NULL);
+
+          g_object_set (clutter_settings_get_default (), "font-dpi", xft_dpi, NULL);
+        }
     }
 
   /* Make sure clutter and gdk scaling stays disabled */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]