Mercurial > aewl
changeset 252:d1630548c3fe
implemented focusprev on button1 press in the bar, and focusnext on button3 press in the bar
author | Anselm R.Garbe <arg@10ksloc.org> |
---|---|
date | Fri, 11 Aug 2006 09:16:40 +0200 (2006-08-11) |
parents | 5c72602fe587 |
children | 7a11e4312b17 |
files | event.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);