diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-04-07 14:53:00 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-04-07 19:24:09 -0400 |
commit | cce36ae701571753094c8ab9892c69e0bf5fb55e (patch) | |
tree | 31700bddac73640bc1ebf5eb1e32b0b78165861a | |
parent | 2f0a02eecb07fb99971062567081ff37bfd5d52b (diff) | |
download | gtk+-font-fallback-fix.tar.gz |
wayland: Improve font setting fallback morefont-fallback-fix
We may get a response from the portal that contains
no useful settings at all. In that case, we should
fallback as well.
Fixes: #3838
-rw-r--r-- | gdk/wayland/gdkdisplay-wayland.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index c071b4e4c5..ba36d0bb82 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1917,6 +1917,14 @@ init_settings (GdkDisplay *display) g_variant_get (ret, "(a{sa{sv}})", &iter); + if (g_variant_n_children (ret) == 0) + { + g_debug ("Received no portal settings"); + g_clear_pointer (&ret, g_variant_unref); + + goto fallback; + } + while (g_variant_iter_loop (iter, "{s@a{sv}}", &schema_str, &val)) { GVariantIter *iter2 = g_variant_iter_new (val); |