gdk/wayland: Mark matched settings from the portal as valid

Commit e6209de962 added some checks on TranslationEntry.valid in
order to figure out whether using the new font settings or the
old g-s-d ones. However that's only set in the non-sandboxed case.

This makes sandboxed applications fallback to the old (and also
non-existing with modern g-s-d) settings, possibly resulting in
ugly defaults being picked.

Fix this by also marking TranslationEntry elements as valid when
using the settings portal, precisely those entries that we are able
to read and match with our own table.
This commit is contained in:
Carlos Garnacho
2021-01-14 15:47:36 +01:00
parent 7ab4c9a68b
commit 02a02fac56

View File

@ -765,6 +765,7 @@ init_settings (GdkScreen *screen)
char *a = g_variant_print (v, FALSE);
g_debug ("Using portal setting for %s %s: %s\n", schema, key, a);
g_free (a);
entry->valid = TRUE;
apply_portal_setting (entry, v, screen);
}
else