summaryrefslogtreecommitdiffhomepage
path: root/patch/bar_status2d.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-08-22 20:31:17 +0200
committerbakkeby <[email protected]>2020-08-22 20:31:17 +0200
commit81f44b036c733ba6494e14a5c358a62186c575be (patch)
tree2dc3a5ccefa824df41cfad6bbbd0a0c45bd98619 /patch/bar_status2d.c
parent46ebaea58f121a33ed0d3ea07f40cfb70c9de2f9 (diff)
downloaddwm-flexipatch-81f44b036c733ba6494e14a5c358a62186c575be.tar.gz
dwm-flexipatch-81f44b036c733ba6494e14a5c358a62186c575be.zip
Simplified Pango integration by settling on common function signatures.
Diffstat (limited to 'patch/bar_status2d.c')
-rw-r--r--patch/bar_status2d.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/patch/bar_status2d.c b/patch/bar_status2d.c
index 4fb1488..8122aa5 100644
--- a/patch/bar_status2d.c
+++ b/patch/bar_status2d.c
@@ -83,13 +83,8 @@ drawstatusbar(int x, char* stext)
isCode = 1;
text[i] = '\0';
- #if BAR_PANGO_PATCH
w = TEXTWM(text) - lrpad;
drw_text(drw, x, 0, w, bh, 0, text, 0, True);
- #else
- w = TEXTW(text) - lrpad;
- drw_text(drw, x, 0, w, bh, 0, text, 0);
- #endif // BAR_PANGO_PATCH
x += w;
@@ -156,13 +151,8 @@ drawstatusbar(int x, char* stext)
}
}
if (!isCode) {
- #if BAR_PANGO_PATCH
w = TEXTWM(text) - lrpad;
drw_text(drw, x, 0, w, bh, 0, text, 0, True);
- #else
- w = TEXTW(text) - lrpad;
- drw_text(drw, x, 0, w, bh, 0, text, 0);
- #endif // BAR_PANGO_PATCH
x += w;
}
free(p);
@@ -197,11 +187,7 @@ status2dtextlength(char* stext)
if (!isCode) {
isCode = 1;
text[i] = '\0';
- #if BAR_PANGO_PATCH
w += TEXTWM(text) - lrpad;
- #else
- w += TEXTW(text) - lrpad;
- #endif // BAR_PANGO_PATCH
text[i] = '^';
if (text[++i] == 'f')
w += atoi(text + ++i);
@@ -213,11 +199,7 @@ status2dtextlength(char* stext)
}
}
if (!isCode)
- #if BAR_PANGO_PATCH
w += TEXTWM(text) - lrpad;
- #else
- w += TEXTW(text) - lrpad;
- #endif // BAR_PANGO_PATCH
free(p);
return w;
} \ No newline at end of file