static const char *buildstr = SPECTRWM_VERSION;
#endif
-#if RANDR_MAJOR < 1
-# error XRandR versions less than 1.0 are not supported
+#if !defined(__CYGWIN__) /* cygwin chokes on xrandr stuff */
+# if RANDR_MAJOR < 1
+# error XRandR versions less than 1.0 are not supported
#endif
-#if RANDR_MAJOR >= 1
-#if RANDR_MINOR >= 2
-#define SWM_XRR_HAS_CRTC
-#endif
-#endif
+# if RANDR_MAJOR >= 1
+# if RANDR_MINOR >= 2
+# define SWM_XRR_HAS_CRTC
+# endif
+# endif
+#endif /* __CYGWIN__ */
#ifndef XCB_ICCCM_NUM_WM_HINTS_ELEMENTS
#define XCB_ICCCM_SIZE_HINT_P_MIN_SIZE XCB_SIZE_HINT_P_MIN_SIZE
XFontSet bar_fs;
XFontSetExtents *bar_fs_extents;
XftFont *bar_font;
-int bar_font_legacy = 0;
+int bar_font_legacy = 1;
char *bar_fonts;
XftColor bar_font_color;
struct passwd *pwd;
"memory for bar_fonts.");
free(b);
- if (isxlfd(value))
- bar_font_legacy = 1;
+ /* If already in xft mode, then we are done. */
+ if (!bar_font_legacy)
+ break;
+
+ /* If there are any non-XLFD entries, switch to Xft mode. */
+ while ((b = strsep(&value, ",")) != NULL) {
+ if (*b == '\0')
+ continue;
+ if (!isxlfd(b)) {
+ bar_font_legacy = 0;
+ break;
+ }
+ }
break;
case SWM_S_BAR_FORMAT:
free(bar_format);