mirror of
git://git.suckless.org/dwm
synced 2024-12-17 12:44:58 +00:00
implemented focusprev on button1 press in the bar, and focusnext on button3 press in the bar
This commit is contained in:
parent
d3969634ac
commit
8278f0a6be
8
event.c
8
event.c
@ -103,15 +103,19 @@ buttonpress(XEvent *e)
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user