[gtk/f16c.msvc: 25/61] wayland: Improve font setting fallback more
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/f16c.msvc: 25/61] wayland: Improve font setting fallback more
- Date: Mon, 12 Apr 2021 10:13:26 +0000 (UTC)
commit 707c8463a4fc27fccbc35f1ee0c123f785b865a3
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Apr 7 14:53:00 2021 -0400
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
gdk/wayland/gdkdisplay-wayland.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]