summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index dd39fe10..09f3ae14 100644
--- a/dwm.c
+++ b/dwm.c
@@ -846,12 +846,14 @@ killclient(const Arg *arg) {
void
manage(Window w, XWindowAttributes *wa) {
+ static Client cz;
Client *c, *t = NULL;
Window trans = None;
XWindowChanges wc;
- if(!(c = calloc(1, sizeof(Client))))
- die("fatal: could not calloc() %u bytes\n", sizeof(Client));
+ if(!(c = malloc(sizeof(Client))))
+ die("fatal: could not malloc() %u bytes\n", sizeof(Client));
+ *c = cz;
c->win = w;
/* geometry */