From 775bd961b679ae0113684551393f69ca6e77ed77 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Tue, 1 Jul 2014 11:26:53 +0200 Subject: [PATCH] hidpi: Scale fonts on wayland On X11 we don't need to scale up fonts because font scaling is already handled by clutter based xft-dpi. On wayland we need to set the resolution by ourselves so do that when the scale factor changes. https://bugzilla.gnome.org/show_bug.cgi?id=732537 --- src/shell-global.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shell-global.c b/src/shell-global.c index 18e3e0993..dab830408 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -784,7 +784,11 @@ update_scale_factor (GtkSettings *settings, g_value_init (&value, G_TYPE_INT); if (gdk_screen_get_setting (global->gdk_screen, "gdk-window-scaling-factor", &value)) - g_object_set (context, "scale-factor", g_value_get_int (&value), NULL); + { + 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); + } /* Make sure clutter and gdk scaling stays disabled */ g_object_set (clutter_settings_get_default (), "window-scaling-factor", 1, NULL);