changeset 662:3e0f11a44293

allowing swap() for first master client
author Anselm R. Garbe <arg@suckless.org>
date Fri, 05 Jan 2007 22:00:15 +0100 (2007-01-05)
parents 4b8096176bbe
children a876f137a5d3
files view.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/view.c	Fri Jan 05 21:56:57 2007 +0100
+++ b/view.c	Fri Jan 05 22:00:15 2007 +0100
@@ -260,14 +260,14 @@
 	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
 		n++;
 
-	c = sel;
-	if((arrange != dofloat) && c != nexttiled(clients)) {
-		detach(c);
-		if(clients)
-			clients->prev = c;
-		c->next = clients;
-		clients = c;
-		focus(c);
-		arrange();
-	}
+	if((c = sel) == nexttiled(clients))
+		if(!(c = nexttiled(c->next)))
+			return;
+	detach(c);
+	if(clients)
+		clients->prev = c;
+	c->next = clients;
+	clients = c;
+	focus(c);
+	arrange();
 }