diff --git a/config.def.h b/config.def.h index 8140a15..d79f4b2 100644 --- a/config.def.h +++ b/config.def.h @@ -70,7 +70,9 @@ static const char *fonts[] = { "monospace:size=10" }; #endif // BAR_PANGO_PATCH static const char dmenufont[] = "monospace:size=10"; +#if BAR_FLEXWINTITLE_PATCH static char c000000[] = "#000000"; // placeholder value +#endif // BAR_FLEXWINTITLE_PATCH static char normfgcolor[] = "#bbbbbb"; static char normbgcolor[] = "#222222"; static char normbordercolor[] = "#444444"; diff --git a/dwm.c b/dwm.c index cc1e827..71aa35c 100644 --- a/dwm.c +++ b/dwm.c @@ -88,6 +88,7 @@ #endif // SCRATCHPADS_PATCH #define TEXTWM(X) (drw_fontset_getwidth(drw, (X), True) + lrpad) #define TEXTW(X) (drw_fontset_getwidth(drw, (X), False) + lrpad) +#define HIDDEN(C) ((getstate(C->win) == IconicState)) /* enums */ enum { @@ -1280,7 +1281,10 @@ Monitor * createmon(void) { Monitor *m, *mon; - int i, n, mi, max_bars = 2, istopbar = topbar, layout; + int i, n, mi, max_bars = 2, istopbar = topbar; + #if MONITOR_RULES_PATCH + int layout; + #endif // MONITOR_RULES_PATCH const BarRule *br; Bar *bar; diff --git a/patch/bar_wintitle.c b/patch/bar_wintitle.c index c5de68f..7b2cd5a 100644 --- a/patch/bar_wintitle.c +++ b/patch/bar_wintitle.c @@ -30,7 +30,8 @@ draw_wintitle(Bar *bar, BarDrawArg *a) XSetErrorHandler(xerrordummy); #endif // BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH #if BAR_CENTEREDWINDOWNAME_PATCH - pad = (m->ww - TEXTW(m->sel->name)) / 2 - x; + if (TEXTW(m->sel->name) < w) + pad = (w - TEXTW(m->sel->name) + lrpad) / 2; #endif // BAR_CENTEREDWINDOWNAME_PATCH drw_text(drw, x, 0, w, bh, pad, m->sel->name, 0, False); #if BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH @@ -38,7 +39,7 @@ draw_wintitle(Bar *bar, BarDrawArg *a) XSetErrorHandler(xerror); #endif // BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH if (m->sel->isfloating) - drawindicator(m, m->sel, 1, x, w, 0, 0, c->isfixed, floatindicatortype); + drawindicator(m, m->sel, 1, x, w, 0, 0, m->sel->isfixed, floatindicatortype); return 1; } diff --git a/patch/bar_wintitleactions.h b/patch/bar_wintitleactions.h index e37201e..67a9d79 100644 --- a/patch/bar_wintitleactions.h +++ b/patch/bar_wintitleactions.h @@ -1,5 +1,3 @@ -#define HIDDEN(C) ((getstate(C->win) == IconicState)) - static void hide(Client *c); static void show(Client *c); static void togglewin(const Arg *arg);