mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
re-order a bit for readability.
"if it makes you happy" oga@
This commit is contained in:
parent
6e9fa7548b
commit
d1b84c5415
17
client.c
17
client.c
@ -64,22 +64,13 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
|
|||||||
cc->sc = sc;
|
cc->sc = sc;
|
||||||
cc->win = win;
|
cc->win = win;
|
||||||
cc->size = XAllocSizeHints();
|
cc->size = XAllocSizeHints();
|
||||||
|
|
||||||
XGetWMNormalHints(X_Dpy, cc->win, cc->size, &tmp);
|
XGetWMNormalHints(X_Dpy, cc->win, cc->size, &tmp);
|
||||||
if (cc->size->width_inc == 0)
|
if (cc->size->width_inc == 0)
|
||||||
cc->size->width_inc = 1;
|
cc->size->width_inc = 1;
|
||||||
if (cc->size->height_inc == 0)
|
if (cc->size->height_inc == 0)
|
||||||
cc->size->height_inc = 1;
|
cc->size->height_inc = 1;
|
||||||
|
|
||||||
TAILQ_INIT(&cc->nameq);
|
|
||||||
client_setname(cc);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* conf_client() needs at least cc->win and cc->name
|
|
||||||
*/
|
|
||||||
conf_client(cc);
|
|
||||||
|
|
||||||
XGetWindowAttributes(X_Dpy, cc->win, &wattr);
|
|
||||||
|
|
||||||
if (cc->size->flags & PBaseSize) {
|
if (cc->size->flags & PBaseSize) {
|
||||||
cc->geom.min_dx = cc->size->base_width;
|
cc->geom.min_dx = cc->size->base_width;
|
||||||
cc->geom.min_dy = cc->size->base_height;
|
cc->geom.min_dy = cc->size->base_height;
|
||||||
@ -88,10 +79,16 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
|
|||||||
cc->geom.min_dy = cc->size->min_height;
|
cc->geom.min_dy = cc->size->min_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TAILQ_INIT(&cc->nameq);
|
||||||
|
client_setname(cc);
|
||||||
|
|
||||||
|
conf_client(cc);
|
||||||
|
|
||||||
/* Saved pointer position */
|
/* Saved pointer position */
|
||||||
cc->ptr.x = -1;
|
cc->ptr.x = -1;
|
||||||
cc->ptr.y = -1;
|
cc->ptr.y = -1;
|
||||||
|
|
||||||
|
XGetWindowAttributes(X_Dpy, cc->win, &wattr);
|
||||||
cc->geom.x = wattr.x;
|
cc->geom.x = wattr.x;
|
||||||
cc->geom.y = wattr.y;
|
cc->geom.y = wattr.y;
|
||||||
cc->geom.width = wattr.width;
|
cc->geom.width = wattr.width;
|
||||||
|
Loading…
Reference in New Issue
Block a user