diff options
Diffstat (limited to 'dmenu')
| -rw-r--r-- | dmenu/dmenu.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/dmenu/dmenu.c b/dmenu/dmenu.c index 0eb6d45..40153dc 100644 --- a/dmenu/dmenu.c +++ b/dmenu/dmenu.c @@ -130,16 +130,20 @@ cleanup(void) static void updateaccent(void) { -uint32_t s1, s2; - -if (!accentshm) -return; -do { -s1 = accentshm->seq; -memcpy(accentcol, accentshm->color, 8); -s2 = accentshm->seq; -} while (s1 != s2); -drw_clr_create(drw, &scheme[SchemeSel][ColBg], accentcol); + uint32_t s1, s2; + char tmp[8]; + + if (!accentshm) + return; + do { + s1 = accentshm->seq; + memcpy(tmp, accentshm->color, 8); + s2 = accentshm->seq; + } while (s1 != s2); + if (tmp[0] != '#') + return; + memcpy(accentcol, tmp, 8); + drw_clr_create(drw, &scheme[SchemeSel][ColBg], accentcol); } static void |
