summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-08-23 18:18:05 +0200
committerbakkeby <[email protected]>2020-08-23 18:18:05 +0200
commit939a407e250059adedadce4b121fcf3fd3e429e3 (patch)
treeb54da7b0dc1969585faad1560a86c80f8d00d7c9 /patch
parent8ec80be7565e0b2e80a90ba617788b2d06a23f8d (diff)
downloaddwm-flexipatch-939a407e250059adedadce4b121fcf3fd3e429e3.tar.gz
dwm-flexipatch-939a407e250059adedadce4b121fcf3fd3e429e3.zip
Fixing wintitle and a few warning messages ref. #37
Diffstat (limited to 'patch')
-rw-r--r--patch/bar_wintitle.c5
-rw-r--r--patch/bar_wintitleactions.h2
2 files changed, 3 insertions, 4 deletions
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);