dwm-meillo

diff client.c @ 532:651f2c868b31

code polishing, removed unnecessary newlines
author Anselm R. Garbe <arg@10kloc.org>
date Fri, 06 Oct 2006 11:50:15 +0200
parents 2b4bd49fc155
children a5567a0d3011
line diff
     1.1 --- a/client.c	Fri Oct 06 11:37:12 2006 +0200
     1.2 +++ b/client.c	Fri Oct 06 11:50:15 2006 +0200
     1.3 @@ -1,5 +1,4 @@
     1.4 -/*
     1.5 - * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
     1.6 +/* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
     1.7   * See LICENSE file for license details.
     1.8   */
     1.9  #include "dwm.h"
    1.10 @@ -156,7 +155,6 @@
    1.11  		dy = -(c->h);
    1.12  		break;
    1.13  	}
    1.14 -
    1.15  	switch (c->grav) {
    1.16  	default:
    1.17  		break;
    1.18 @@ -177,7 +175,6 @@
    1.19  		dx = -(c->w + c->border);
    1.20  		break;
    1.21  	}
    1.22 -
    1.23  	if(invert) {
    1.24  		dx = -dx;
    1.25  		dy = -dy;
    1.26 @@ -210,10 +207,8 @@
    1.27  	c->w = c->tw = wa->width;
    1.28  	c->h = wa->height;
    1.29  	c->th = bh;
    1.30 -
    1.31  	c->border = 0;
    1.32  	updatesize(c);
    1.33 -
    1.34  	if(c->x + c->w + 2 * BORDERPX > sw)
    1.35  		c->x = sw - c->w - 2 * BORDERPX;
    1.36  	if(c->x < sx)
    1.37 @@ -222,7 +217,6 @@
    1.38  		c->y = sh - c->h - 2 * BORDERPX;
    1.39  	if(c->h != sh && c->y < bh)
    1.40  		c->y = bh;
    1.41 -
    1.42  	c->proto = getproto(c->win);
    1.43  	XSelectInput(dpy, c->win,
    1.44  		StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
    1.45 @@ -230,12 +224,10 @@
    1.46  	twa.override_redirect = 1;
    1.47  	twa.background_pixmap = ParentRelative;
    1.48  	twa.event_mask = ExposureMask | EnterWindowMask;
    1.49 -
    1.50  	c->twin = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th,
    1.51  			0, DefaultDepth(dpy, screen), CopyFromParent,
    1.52  			DefaultVisual(dpy, screen),
    1.53  			CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa);
    1.54 -
    1.55  	grabbuttons(c, False);
    1.56  	updatetitle(c);
    1.57  	settags(c, getclient(trans));
    1.58 @@ -244,13 +236,11 @@
    1.59  			|| (c->maxw && c->minw &&
    1.60  				c->maxw == c->minw && c->maxh == c->minh);
    1.61  	resizetitle(c);
    1.62 -
    1.63  	if(clients)
    1.64  		clients->prev = c;
    1.65  	c->next = clients;
    1.66  	c->snext = stack;
    1.67  	stack = clients = c;
    1.68 -
    1.69  	ban(c);
    1.70  	XMapWindow(dpy, c->win);
    1.71  	XMapWindow(dpy, c->twin);
    1.72 @@ -283,7 +273,6 @@
    1.73  		c->x = right - c->w;
    1.74  	if(sticky == BotLeft || sticky == BotRight)
    1.75  		c->y = bottom - c->h;
    1.76 -
    1.77  	/* offscreen appearance fixes */
    1.78  	if(c->x + c->w < sx)
    1.79  		c->x = sx;
    1.80 @@ -293,7 +282,6 @@
    1.81  		c->x = sw - c->w;
    1.82  	if(c->y > sh)
    1.83  		c->y = sh - c->h;
    1.84 -
    1.85  	resizetitle(c);
    1.86  	wc.x = c->x;
    1.87  	wc.y = c->y;
    1.88 @@ -392,20 +380,16 @@
    1.89  	/* The server grab construct avoids race conditions. */
    1.90  	XGrabServer(dpy);
    1.91  	XSetErrorHandler(xerrordummy);
    1.92 -
    1.93  	detach(c);
    1.94  	detachstack(c);
    1.95  	if(sel == c) {
    1.96  		for(nc = stack; nc && !isvisible(nc); nc = nc->snext);
    1.97  		focus(nc);
    1.98  	}
    1.99 -
   1.100  	XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
   1.101  	XDestroyWindow(dpy, c->twin);
   1.102 -
   1.103  	free(c->tags);
   1.104  	free(c);
   1.105 -
   1.106  	XSync(dpy, False);
   1.107  	XSetErrorHandler(xerror);
   1.108  	XUngrabServer(dpy);