fixed
authorAnselm R.Garbe <arg@10ksloc.org>
Mon, 14 Aug 2006 17:48:54 +0200
changeset 286 ff501d94de62
parent 285 e864d658eb02
child 287 5e5e5392c7cb
fixed
client.c
event.c
--- a/client.c	Mon Aug 14 17:14:22 2006 +0200
+++ b/client.c	Mon Aug 14 17:48:54 2006 +0200
@@ -49,10 +49,12 @@
 void
 focus(Client *c)
 {
+	Client *old = sel;
+
 	if (!issel)
 		return;
-	Client *old = sel;
-
+	if(sel && sel->ismax)
+		togglemax(NULL);
 	sel = c;
 	if(old && old != c)
 		drawtitle(old);
@@ -68,9 +70,6 @@
 	if(!sel)
 		return;
 
-	if(sel->ismax)
-		togglemax(NULL);
-
 	if(!(c = getnext(sel->next)))
 		c = getnext(clients);
 	if(c) {
@@ -87,9 +86,6 @@
 	if(!sel)
 		return;
 
-	if(sel->ismax)
-		togglemax(NULL);
-
 	if(!(c = getprev(sel->prev))) {
 		for(c = clients; c && c->next; c = c->next);
 		c = getprev(c);
--- a/event.c	Mon Aug 14 17:14:22 2006 +0200
+++ b/event.c	Mon Aug 14 17:48:54 2006 +0200
@@ -144,11 +144,11 @@
 static void
 configurerequest(XEvent *e)
 {
+	unsigned long newmask;
 	Client *c;
 	XConfigureRequestEvent *ev = &e->xconfigurerequest;
 	XEvent synev;
 	XWindowChanges wc;
-	unsigned long newmask;
 
 	if((c = getclient(ev->window))) {
 		gravitate(c, True);