diff options
| author | bakkeby <[email protected]> | 2020-08-22 20:31:17 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-08-22 20:31:17 +0200 |
| commit | 81f44b036c733ba6494e14a5c358a62186c575be (patch) | |
| tree | 2dc3a5ccefa824df41cfad6bbbd0a0c45bd98619 /patch/bar_wintitle.c | |
| parent | 46ebaea58f121a33ed0d3ea07f40cfb70c9de2f9 (diff) | |
| download | dwm-flexipatch-81f44b036c733ba6494e14a5c358a62186c575be.tar.gz dwm-flexipatch-81f44b036c733ba6494e14a5c358a62186c575be.zip | |
Simplified Pango integration by settling on common function signatures.
Diffstat (limited to 'patch/bar_wintitle.c')
| -rw-r--r-- | patch/bar_wintitle.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/patch/bar_wintitle.c b/patch/bar_wintitle.c index 0aded6c..c5de68f 100644 --- a/patch/bar_wintitle.c +++ b/patch/bar_wintitle.c @@ -17,6 +17,7 @@ draw_wintitle(Bar *bar, BarDrawArg *a) int x = a->x, w = a->w; #endif // BAR_TITLE_LEFT_PAD_PATCH | BAR_TITLE_RIGHT_PAD_PATCH Monitor *m = bar->mon; + int pad = lrpad / 2; if (!m->sel) { drw_setscheme(drw, scheme[SchemeTitleNorm]); @@ -29,19 +30,9 @@ draw_wintitle(Bar *bar, BarDrawArg *a) XSetErrorHandler(xerrordummy); #endif // BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH #if BAR_CENTEREDWINDOWNAME_PATCH - int mid = (m->ww - TEXTW(m->sel->name)) / 2 - x; - #if BAR_PANGO_PATCH - drw_text(drw, x, 0, w, bh, mid, m->sel->name, 0, False); - #else - drw_text(drw, x, 0, w, bh, mid, m->sel->name, 0); - #endif // BAR_PANGO_PATCH - #else - #if BAR_PANGO_PATCH - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0, False); - #else - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); - #endif // BAR_PANGO_PATCH + pad = (m->ww - TEXTW(m->sel->name)) / 2 - x; #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 XSync(dpy, False); XSetErrorHandler(xerror); |
