diff options
| author | auric <104602845+ihateamongus@users.noreply.github.com> | 2025-09-07 17:08:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-07 17:08:01 -0500 |
| commit | 417c5740bc4cd96e053b5725589fe3c4a835a231 (patch) | |
| tree | fcf771779ae1dedaab2433d5242118e84c68f02b /dmenu | |
| parent | c683be2f77a688e3ed162f97820a5c07f9d90a78 (diff) | |
| parent | 2eec1939699ed3fa9e6b3699c2899e0e94a9d978 (diff) | |
Merge pull request #3 from ihateamongus/codex/analyze-oldresources-folder-for-performance-yvoz5b
Resolved. May need tweaks.
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 |
