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
This commit is contained in:
Adel Gadllah 2014-07-01 11:26:53 +02:00
parent 3c67d012e7
commit 775bd961b6

View File

@ -784,7 +784,11 @@ update_scale_factor (GtkSettings *settings,
g_value_init (&value, G_TYPE_INT); g_value_init (&value, G_TYPE_INT);
if (gdk_screen_get_setting (global->gdk_screen, "gdk-window-scaling-factor", &value)) 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 */ /* Make sure clutter and gdk scaling stays disabled */
g_object_set (clutter_settings_get_default (), "window-scaling-factor", 1, NULL); g_object_set (clutter_settings_get_default (), "window-scaling-factor", 1, NULL);