Fixing wintitle and a few warning messages ref. #37

This commit is contained in:
bakkeby 2020-08-23 18:18:05 +02:00
parent 8ec80be756
commit 939a407e25
4 changed files with 10 additions and 5 deletions

View File

@ -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";

6
dwm.c
View File

@ -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;

View File

@ -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;
}

View File

@ -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);