summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2020-03-28 01:01:10 +0100
committerFlorian Müllner <fmuellner@gnome.org>2020-03-28 01:04:17 +0100
commited10aea44d8535f7750a62c8c5c94faaa5675945 (patch)
treeb65abd9b9105db51107477689c2fc5cce0488f4c
parentfed5f4d9aae29eba97e6e7ca58912962e5ac22e1 (diff)
downloadmutter-ed10aea44d8535f7750a62c8c5c94faaa5675945.tar.gz
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
-rw-r--r--cogl/cogl-pango/cogl-pango-render.c2
1 files changed, 1 insertions, 1 deletions
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);
}