]> code.delx.au - spectrwm/commitdiff
Oops, bar_font conflicted, renamed bar_font to font in bar_setup.
authorReginald Kennedy <rk@rejii.com>
Tue, 17 Jul 2012 20:45:24 +0000 (04:45 +0800)
committerReginald Kennedy <rk@rejii.com>
Fri, 20 Jul 2012 22:00:02 +0000 (06:00 +0800)
Add the correct libraries and include to linux Makefile.

linux/Makefile
spectrwm.c

index 7637692650e7b0de4f3da5dc849609b2fa639d20..8646531e6f66b44e0d0a258a29d8671bb972a763 100644 (file)
@@ -1,6 +1,6 @@
-CFLAGS+= -Wall -Wextra -g -D_GNU_SOURCE -I.
+CFLAGS+= -Wall -Wextra -g -D_GNU_SOURCE -I. -I/usr/include/freetype2
 CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\"
-LDADD+= -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest
+LDADD+= -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest -lXft
 
 PREFIX?= /usr/local
 BINDIR?= $(PREFIX)/bin
index 56b63b3e5eb7be3de4a742bf1b6662f2535fd1de..5667102440b923cfd835823a78e4bd509d068f35 100644 (file)
@@ -1841,7 +1841,7 @@ bar_refresh(void)
 void
 bar_setup(struct swm_region *r)
 {
-       char                    *bar_font;
+       char                    *font;
        xcb_screen_t            *screen = get_screen(r->s->idx);
        uint32_t                wa[3];
 
@@ -1853,19 +1853,19 @@ bar_setup(struct swm_region *r)
        if ((r->bar = calloc(1, sizeof(struct swm_bar))) == NULL)
                err(1, "bar_setup: calloc: failed to allocate memory.");
 
-       while ((bar_font = strsep(&bar_fonts, " ,")) != NULL) {
-               if (*bar_font == '\0')
+       while ((font = strsep(&bar_fonts, " ,")) != NULL) {
+               if (*font == '\0')
                        continue;
 
-               DNPRINTF(SWM_D_INIT, "bar_setup: try font %s\n", bar_font);
+               DNPRINTF(SWM_D_INIT, "bar_setup: try font %s\n", font);
                bar_font = XftFontOpenName(display, DefaultScreen(display),
-                           bar_font);
+                           font);
                if (!bar_font) {
-                       warnx("unable to load font %s", bar_font);
+                       warnx("unable to load font %s", font);
                        continue;
                } else {
                        DNPRINTF(SWM_D_INIT, "successfully opened font %s\n",
-                           bar_font);
+                           font);
                        break;
                }
        }