diff -r 65c37b4be9cb dwm.c
--- a/dwm.c	Mon Aug 04 17:39:36 2008 +0100
+++ b/dwm.c	Sat Aug 09 12:44:33 2008 +0200
@@ -61,7 +61,7 @@
 enum { ColBorder, ColFG, ColBG, ColLast };              /* color */
 enum { NetSupported, NetWMName, NetLast };              /* EWMH atoms */
 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
-enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
+enum { ClkTagBar, ClkTagButton, ClkLtSymbol, ClkStatusText, ClkWinTitle,
        ClkClientWin, ClkRootWin, ClkLast };             /* clicks */
 
 typedef union {
@@ -325,9 +325,10 @@
 	}
 
 	for(i = 0; i < LENGTH(buttons); i++)
-		if(click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
+		if((click == buttons[i].click || (buttons[i].click == ClkTagButton
+		   && click == ClkTagBar)) && buttons[i].func && buttons[i].button == ev->button
 		   && CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
-			buttons[i].func(click == ClkTagBar ? &arg : &buttons[i].arg);
+			buttons[i].func(buttons[i].click == ClkTagButton ? &arg : &buttons[i].arg);
 }
 
 void
@@ -1048,8 +1049,6 @@
 
 void
 resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
-	XWindowChanges wc;
-
 	if(sizehints) {
 		/* set minimum possible */
 		w = MAX(1, w);
@@ -1100,17 +1099,11 @@
 		h = bh;
 	if(w < bh)
 		w = bh;
-	if(c->x != x || c->y != y || c->w != w || c->h != h) {
-		c->x = wc.x = x;
-		c->y = wc.y = y;
-		c->w = wc.width = w;
-		c->h = wc.height = h;
-		wc.border_width = c->bw;
-		XConfigureWindow(dpy, c->win,
-				CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
-		configure(c);
-		XSync(dpy, False);
-	}
+	c->x = x;
+	c->y = y;
+	c->w = w;
+	c->h = h;
+	XMoveResizeWindow(dpy, c->win, x, y, w, h);
 }
 
 void
@@ -1165,22 +1158,16 @@
 restack(void) {
 	Client *c;
 	XEvent ev;
-	XWindowChanges wc;
 
 	drawbar();
 	if(!sel)
 		return;
 	if(sel->isfloating || !lt[sellt]->arrange)
 		XRaiseWindow(dpy, sel->win);
-	if(lt[sellt]->arrange) {
-		wc.stack_mode = Below;
-		wc.sibling = barwin;
+	if(lt[sellt]->arrange)
 		for(c = stack; c; c = c->snext)
-			if(!c->isfloating && ISVISIBLE(c)) {
-				XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
-				wc.sibling = c->win;
-			}
-	}
+			if(!c->isfloating && ISVISIBLE(c))
+				XLowerWindow(dpy, c->win);
 	XSync(dpy, False);
 	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
 }
