From ed10aea44d8535f7750a62c8c5c94faaa5675945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 28 Mar 2020 01:01:10 +0100 Subject: [PATCH] cogl-pango: Special case alpha of 0 pango_renderer_get_alpha() returns 0 to indicate that the alpha value should be inherited from the environment, but we are passing it on (and therefore making the text fully translucent). Instead, make the text fully opaque as expected. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1156 --- cogl/cogl-pango/cogl-pango-render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogl/cogl-pango/cogl-pango-render.c b/cogl/cogl-pango/cogl-pango-render.c index 306513db7..938da98e9 100644 --- a/cogl/cogl-pango/cogl-pango-render.c +++ b/cogl/cogl-pango/cogl-pango-render.c @@ -730,7 +730,7 @@ cogl_pango_renderer_set_color_for_part (PangoRenderer *renderer, pango_color->red >> 8, pango_color->green >> 8, pango_color->blue >> 8, - alpha >> 8); + alpha ? alpha >> 8 : 0xff); _cogl_pango_display_list_set_color_override (priv->display_list, &color); }