implemented focusprev on button1 press in the bar, and focusnext on button3 press in the bar
authorAnselm R.Garbe <arg@10ksloc.org>
Fri, 11 Aug 2006 09:16:40 +0200
changeset 252 d1630548c3fe
parent 251 5c72602fe587
child 253 7a11e4312b17
implemented focusprev on button1 press in the bar, and focusnext on button3 press in the bar
event.c
--- a/event.c	Fri Aug 11 08:47:55 2006 +0200
+++ b/event.c	Fri Aug 11 09:16:40 2006 +0200
@@ -103,15 +103,19 @@
 
 	if(barwin == ev->window) {
 		switch(ev->button) {
-		default:
+		case Button1:
 			x = 0;
 			for(a.i = 0; a.i < ntags; a.i++) {
 				x += textw(tags[a.i]);
 				if(ev->x < x) {
 					view(&a);
-					break;
+					return;
 				}
 			}
+			focusprev(NULL);
+			break;
+		case Button3:
+			focusnext(NULL);
 			break;
 		case Button4:
 			viewprev(&a);