diff options
author | 2019-12-27 23:33:55 -0500 | |
---|---|---|
committer | 2019-12-28 10:07:25 +0100 | |
commit | 97f9f0b699316ba60009b395948a712ec0b671d2 (patch) | |
tree | b5916b36f4161c1c4d670295254d0f3fd9e793df /common/stringop.c | |
parent | layer-shell: refocus if keyboard interactive lost (diff) | |
download | sway-97f9f0b699316ba60009b395948a712ec0b671d2.tar.gz sway-97f9f0b699316ba60009b395948a712ec0b671d2.tar.zst sway-97f9f0b699316ba60009b395948a712ec0b671d2.zip |
parse_color: return success + drop fallback color
This is the first in a series of commits to refactor the color handling
in sway. This changes parse_color to return whether it was success and
no longer uses 0xFFFFFFFF as the fallback color. This also verifies that
the string actually contains a valid hexadecimal number along with
the length checks.
In the process of altering the calls to parse_color, I also took the
opportunity to heavily refactor swaybar's ipc_parse_colors function.
This allowed for several lines of duplicated code to be removed.
Diffstat (limited to 'common/stringop.c')
0 files changed, 0 insertions, 0 deletions