summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-07-24 11:15:44 +0200
committerbakkeby <[email protected]>2020-07-24 11:15:44 +0200
commit2cf37aa49209f2ad702dd4ec13d111f3c4a610ee (patch)
tree10548d4851c237787bc42185f664b41d46b6cb58 /patch
parent6eb24902f2154ced1e20a096a90ca29002ea3eb9 (diff)
downloaddwm-flexipatch-2cf37aa49209f2ad702dd4ec13d111f3c4a610ee.tar.gz
dwm-flexipatch-2cf37aa49209f2ad702dd4ec13d111f3c4a610ee.zip
status2d: rawstext may not exist if neither statuscmd nor the extrabar patch is used
Diffstat (limited to 'patch')
-rw-r--r--patch/bar_status2d.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/patch/bar_status2d.c b/patch/bar_status2d.c
index e746ac6..f98e27a 100644
--- a/patch/bar_status2d.c
+++ b/patch/bar_status2d.c
@@ -1,28 +1,44 @@
int
width_status2d(Bar *bar, BarWidthArg *a)
{
+ #if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
return status2dtextlength(rawstext) + lrpad;
+ #else
+ return status2dtextlength(stext) + lrpad;
+ #endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
}
#if BAR_EXTRASTATUS_PATCH
int
width_status2d_es(Bar *bar, BarWidthArg *a)
{
- return status2dtextlength(rawestext);
+ #if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
+ return status2dtextlength(rawestext) + lrpad;
+ #else
+ return status2dtextlength(estext) + lrpad;
+ #endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
}
#endif // BAR_EXTRASTATUS_PATCH
int
draw_status2d(Bar *bar, BarDrawArg *a)
{
+ #if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
return drawstatusbar(a->x, rawstext);
+ #else
+ return drawstatusbar(a->x, stext);
+ #endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
}
#if BAR_EXTRASTATUS_PATCH
int
draw_status2d_es(Bar *bar, BarDrawArg *a)
{
+ #if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
return drawstatusbar(a->x, rawestext);
+ #else
+ return drawstatusbar(a->x, estext);
+ #endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
}
#endif // BAR_EXTRASTATUS_PATCH