Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix user bar_font not being applied to dmenu.
[spectrwm.git]
/
spectrwm.c
diff --git
a/spectrwm.c
b/spectrwm.c
index
14716c7
..
8e94b16
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-1848,7
+1848,7
@@
bar_refresh(void)
void
bar_setup(struct swm_region *r)
{
void
bar_setup(struct swm_region *r)
{
- char *font, *fontpos;
+ char *font, *fontpos, *dup, *search;
int count;
xcb_screen_t *screen = get_screen(r->s->idx);
uint32_t wa[3];
int count;
xcb_screen_t *screen = get_screen(r->s->idx);
uint32_t wa[3];
@@
-1861,7
+1861,10
@@
bar_setup(struct swm_region *r)
err(1, "bar_setup: calloc: failed to allocate memory.");
if (bar_font == NULL) {
err(1, "bar_setup: calloc: failed to allocate memory.");
if (bar_font == NULL) {
- while ((font = strsep(&bar_fonts, ",")) != NULL) {
+ if ((dup = strdup(bar_fonts)) == NULL)
+ errx(1, "insufficient memory.");
+ search = dup;
+ while ((font = strsep(&search, ",")) != NULL) {
if (*font == '\0')
continue;
if (*font == '\0')
continue;
@@
-1889,6
+1892,7
@@
bar_setup(struct swm_region *r)
break;
}
}
break;
}
}
+ free(dup);
}
if (bar_font == NULL)
}
if (bar_font == NULL)