summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-01-14 15:47:36 +0100
committerCarlos Garnacho <carlosg@gnome.org>2021-01-14 16:09:27 +0100
commit02a02fac56f3291108c987bb0448406478150056 (patch)
tree3d21cce068af163e56f2f6b92386506432be9b96
parent7ab4c9a68b79dc0606eef70f62c914847b9aaa72 (diff)
downloadgtk+-02a02fac56f3291108c987bb0448406478150056.tar.gz
gdk/wayland: Mark matched settings from the portal as validwip/carlosg/mark-valid-portal-settings-3-24
Commit e6209de9625 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.
-rw-r--r--gdk/wayland/gdkscreen-wayland.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index 01e420c669..e52f9171c7 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -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