aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-12-28 04:01:38 -0500
committerLibravatar Simon Ser <contact@emersion.fr>2019-12-28 10:07:25 +0100
commitf898ca9a83a54133017b76039894679dcccd2e30 (patch)
tree464814f27056889b0d2c22c306c0d904be6833af /include
parentcmd_client_*: refactor duplicated code (diff)
downloadsway-f898ca9a83a54133017b76039894679dcccd2e30.tar.gz
sway-f898ca9a83a54133017b76039894679dcccd2e30.tar.zst
sway-f898ca9a83a54133017b76039894679dcccd2e30.zip
bar_cmd_colors: remove add_color
This is the third commit in a series of commits to refactor color handling in sway. This removes add_color from commands.c. It was only being used by bar_cmd_colors. This also changes the functions to use parse_color which is used to validate rgb(a) colors throughout the code base and is also what i3bar is using to parse the colors after they are passed over ipc. After parsing the color and ensuring it is valid, the rgba hex string is then generated using snprintf. This refactor also ensures that all the colors for the command are valid before applying any of them.
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 982125c1..f992b441 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -88,8 +88,6 @@ void free_cmd_results(struct cmd_results *results);
88 */ 88 */
89char *cmd_results_to_json(list_t *res_list); 89char *cmd_results_to_json(list_t *res_list);
90 90
91struct cmd_results *add_color(char *buffer, const char *color);
92
93/** 91/**
94 * TODO: Move this function and its dependent functions to container.c. 92 * TODO: Move this function and its dependent functions to container.c.
95 */ 93 */