mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Switch to just malloc since we need initialize most everything anyway.
This commit is contained in:
parent
b14a4b222d
commit
e1234b75b8
12
client.c
12
client.c
@ -67,12 +67,18 @@ client_init(Window win, struct screen_ctx *sc)
|
||||
mapped = wattr.map_state != IsUnmapped;
|
||||
}
|
||||
|
||||
cc = xcalloc(1, sizeof(*cc));
|
||||
cc = xmalloc(sizeof(*cc));
|
||||
|
||||
XGrabServer(X_Dpy);
|
||||
|
||||
cc->sc = sc;
|
||||
cc->win = win;
|
||||
cc->gc = NULL;
|
||||
cc->flags = 0;
|
||||
cc->stackingorder = 0;
|
||||
memset(&cc->hint, 0, sizeof(cc->hint));
|
||||
cc->ptr.x = -1;
|
||||
cc->ptr.y = -1;
|
||||
|
||||
TAILQ_INIT(&cc->nameq);
|
||||
client_setname(cc);
|
||||
@ -85,10 +91,6 @@ client_init(Window win, struct screen_ctx *sc)
|
||||
client_getsizehints(cc);
|
||||
client_mwm_hints(cc);
|
||||
|
||||
/* Saved pointer position */
|
||||
cc->ptr.x = -1;
|
||||
cc->ptr.y = -1;
|
||||
|
||||
cc->geom.x = wattr.x;
|
||||
cc->geom.y = wattr.y;
|
||||
cc->geom.w = wattr.width;
|
||||
|
Loading…
Reference in New Issue
Block a user