diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2009-05-30 00:30:18 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2009-05-30 00:30:18 +0000 |
commit | c5ae4a2d0fc26a047cd763fff36f7add25a57d94 (patch) | |
tree | fb3fba9ba290148b3320d13eff027acf91300068 /app/cwm/client.c | |
parent | e8d95bf210c652912716cc41e6f48e4b8f656792 (diff) |
re-order a bit for readability.
"if it makes you happy" oga@
Diffstat (limited to 'app/cwm/client.c')
-rw-r--r-- | app/cwm/client.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c index cb0e981d3..f7ed30f54 100644 --- a/app/cwm/client.c +++ b/app/cwm/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: client.c,v 1.50 2009/05/18 00:23:35 okan Exp $ + * $Id: client.c,v 1.51 2009/05/30 00:30:17 okan Exp $ */ #include "headers.h" @@ -64,22 +64,13 @@ client_new(Window win, struct screen_ctx *sc, int mapped) cc->sc = sc; cc->win = win; cc->size = XAllocSizeHints(); + XGetWMNormalHints(X_Dpy, cc->win, cc->size, &tmp); if (cc->size->width_inc == 0) cc->size->width_inc = 1; if (cc->size->height_inc == 0) 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) { cc->geom.min_dx = cc->size->base_width; 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; } + TAILQ_INIT(&cc->nameq); + client_setname(cc); + + conf_client(cc); + /* Saved pointer position */ cc->ptr.x = -1; cc->ptr.y = -1; + XGetWindowAttributes(X_Dpy, cc->win, &wattr); cc->geom.x = wattr.x; cc->geom.y = wattr.y; cc->geom.width = wattr.width; |