Re: [wmii] wmii 3.1 feature request

From: Kris Maglione <bsdaemon_AT_comcast.net>
Date: Tue, 4 Jul 2006 19:34:32 -0400

On Tue, Jul 04, 2006 at 02:22:16PM -0700, Suraj N. Kurapati wrote:
> Make column selection wrap around. So if I am at the right most
>column and I input "select the column at right", then wmii should
>select the left-most column. Same thing applies for the reverse
>case: selecting column to the left of left-most column will put
>focus on right-most column.
To begin with, wmii-3 development has ended and is not intended to include
anything but bug fixes in the future. Secondly, garbeam has argued against
this feature in the past for some reason or another. I've included a patch to
add it that applies against wmii-3 tip and most likely against 3.1 also. (bear
in mind that I have not tested it).

-- 
Kris Maglione
That goes against the laws of Physics.
diff -r e74862ed4b76 cmd/wm/area.c
--- a/cmd/wm/area.c	Thu Jun 29 22:59:20 2006 -0400
+++ b/cmd/wm/area.c	Tue Jul 04 19:34:09 2006 -0400
@@ -112,15 +112,19 @@ select_area(Area *a, char *arg)
 		else
 			i = 1;
 	} else if(!strncmp(arg, "prev", 5)) {
-		if(i <= 1)
+		if(i == 0)
 			return;
+		else if(i == 1)
+			i = v->area.size - 1;
 		else
 			i--;
 	} else if(!strncmp(arg, "next", 5)) {
-		if(i > 0 && (i + 1 < v->area.size))
+		if(i == 0)
+			return
+		else if(i + 1 < v->area.size))
 			i++;
 		else
-			return;
+			i = 1;
 	}
 	else {
 		const char *errstr;
Received on Wed Jul 05 2006 - 01:35:06 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:10:40 UTC