removed gravitate for the moment
authorarg@mig29
Mon, 11 Dec 2006 16:45:02 +0100
changeset 630 264f02dd2ad0
parent 629 58851a8806b9
child 631 d6fbb669fef2
removed gravitate for the moment
client.c
dwm.h
event.c
--- a/client.c	Mon Dec 11 09:42:16 2006 +0100
+++ b/client.c	Mon Dec 11 16:45:02 2006 +0100
@@ -132,59 +132,6 @@
 }
 
 void
-gravitate(Client *c, Bool invert) {
-	int dx = 0, dy = 0;
-
-	return;
-	switch(c->grav) {
-	default:
-		break;
-	case StaticGravity:
-	case NorthWestGravity:
-	case NorthGravity:
-	case NorthEastGravity:
-		dy = c->border;
-		break;
-	case EastGravity:
-	case CenterGravity:
-	case WestGravity:
-		dy = -(c->h / 2) + c->border;
-		break;
-	case SouthEastGravity:
-	case SouthGravity:
-	case SouthWestGravity:
-		dy = -(c->h);
-		break;
-	}
-	switch (c->grav) {
-	default:
-		break;
-	case StaticGravity:
-	case NorthWestGravity:
-	case WestGravity:
-	case SouthWestGravity:
-		dx = c->border;
-		break;
-	case NorthGravity:
-	case CenterGravity:
-	case SouthGravity:
-		dx = -(c->w / 2) + c->border;
-		break;
-	case NorthEastGravity:
-	case EastGravity:
-	case SouthEastGravity:
-		dx = -(c->w + c->border);
-		break;
-	}
-	if(invert) {
-		dx = -dx;
-		dy = -dy;
-	}
-	c->x += dx;
-	c->y += dy;
-}
-
-void
 killclient(Arg *arg) {
 	if(!sel)
 		return;
@@ -291,7 +238,7 @@
 	else
 		wc.border_width = BORDERPX;
 	XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
-	/*configure(c);*/
+	configure(c);
 	XSync(dpy, False);
 }
 
--- a/dwm.h	Mon Dec 11 09:42:16 2006 +0100
+++ b/dwm.h	Mon Dec 11 16:45:02 2006 +0100
@@ -114,7 +114,6 @@
 extern void focus(Client *c);			/* focus c, c may be NULL */
 extern Client *getclient(Window w);		/* return client of w */
 extern Client *getctitle(Window w);		/* return client of title window */
-extern void gravitate(Client *c, Bool invert);	/* gravitate c */
 extern void killclient(Arg *arg);		/* kill c nicely */
 extern void manage(Window w, XWindowAttributes *wa);	/* manage new client */
 extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/
--- a/event.c	Mon Dec 11 09:42:16 2006 +0100
+++ b/event.c	Mon Dec 11 16:45:02 2006 +0100
@@ -161,7 +161,6 @@
 
 	if((c = getclient(ev->window))) {
 		c->ismax = False;
-		gravitate(c, True);
 		if(ev->value_mask & CWX)
 			c->x = ev->x;
 		if(ev->value_mask & CWY)
@@ -172,7 +171,6 @@
 			c->h = ev->height;
 		if(ev->value_mask & CWBorderWidth)
 			c->border = ev->border_width;
-		gravitate(c, False);
 		wc.x = c->x;
 		wc.y = c->y;
 		wc.width = c->w;