diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-04-07 14:28:39 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-04-07 14:30:48 -0400 |
commit | dfea8c31d97379ff62635474ffde0d388b4b85ac (patch) | |
tree | fd7b8d2308fb1c4ac07b50f694632442b13156aa | |
parent | c3280c6b3c6d1ae9bda58d379e515faa45b4b934 (diff) | |
download | gtk+-dfea8c31d97379ff62635474ffde0d388b4b85ac.tar.gz |
wayland: Improve font setting fallback more
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/gdkscreen-wayland.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c index e9a4f0e4c2..6f8b5e8d93 100644 --- a/gdk/wayland/gdkscreen-wayland.c +++ b/gdk/wayland/gdkscreen-wayland.c @@ -745,6 +745,14 @@ init_settings (GdkScreen *screen) goto fallback; } + if (g_variant_n_children (ret) == 0) + { + g_debug ("Received no portal settings"); + g_clear_pointer (&ret, g_variant_unref); + + goto fallback; + } + g_variant_get (ret, "(a{sa{sv}})", &iter); while (g_variant_iter_loop (iter, "{s@a{sv}}", &schema, &val)) |