From 52f5793c9bedbd3400122d51c0eb05571961d899 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 21 Nov 2019 18:24:32 -0600 Subject: [PATCH] Use get_color_from_term() instead of get_background_color_from_term() The former already checks for term_is_transparent() as its first thing. Part of https://gitlab.gnome.org/GNOME/gnome-shell/issues/1934 --- src/st/st-theme-node.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c index 5dc7bc5b6..bd2f21f83 100644 --- a/src/st/st-theme-node.c +++ b/src/st/st-theme-node.c @@ -1916,24 +1916,6 @@ st_theme_node_get_max_height (StThemeNode *node) return node->max_height; } -static GetFromTermResult -get_background_color_from_term (StThemeNode *node, - CRTerm *term, - ClutterColor *color) -{ - GetFromTermResult result = get_color_from_term (node, term, color); - if (result == VALUE_NOT_FOUND) - { - if (term_is_transparent (term)) - { - *color = TRANSPARENT_COLOR; - return VALUE_FOUND; - } - } - - return result; -} - void _st_theme_node_ensure_background (StThemeNode *node) { @@ -1978,7 +1960,7 @@ _st_theme_node_ensure_background (StThemeNode *node) for (term = decl->value; term; term = term->next) { - GetFromTermResult result = get_background_color_from_term (node, term, &node->background_color); + GetFromTermResult result = get_color_from_term (node, term, &node->background_color); if (result == VALUE_FOUND) { /* color stored in node->background_color */ @@ -2087,7 +2069,7 @@ _st_theme_node_ensure_background (StThemeNode *node) if (decl->value == NULL || decl->value->next != NULL) continue; - result = get_background_color_from_term (node, decl->value, &node->background_color); + result = get_color_from_term (node, decl->value, &node->background_color); if (result == VALUE_FOUND) { /* color stored in node->background_color */