|
|
@ -109,19 +109,17 @@ buttonpress(XEvent *e) |
|
|
|
for(a.i = 0; a.i < ntags; a.i++) { |
|
|
|
for(a.i = 0; a.i < ntags; a.i++) { |
|
|
|
x += textw(tags[a.i]); |
|
|
|
x += textw(tags[a.i]); |
|
|
|
if(ev->x < x) { |
|
|
|
if(ev->x < x) { |
|
|
|
switch(ev->button) { |
|
|
|
if(ev->button == Button1) { |
|
|
|
case Button1: |
|
|
|
|
|
|
|
if(ev->state & MODKEY) |
|
|
|
if(ev->state & MODKEY) |
|
|
|
tag(&a); |
|
|
|
tag(&a); |
|
|
|
else |
|
|
|
else |
|
|
|
view(&a); |
|
|
|
view(&a); |
|
|
|
break; |
|
|
|
} |
|
|
|
case Button3: |
|
|
|
else if(ev->button == Button3) { |
|
|
|
if(ev->state & MODKEY) |
|
|
|
if(ev->state & MODKEY) |
|
|
|
toggletag(&a); |
|
|
|
toggletag(&a); |
|
|
|
else |
|
|
|
else |
|
|
|
toggleview(&a); |
|
|
|
toggleview(&a); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -133,26 +131,17 @@ buttonpress(XEvent *e) |
|
|
|
} |
|
|
|
} |
|
|
|
else if((c = getclient(ev->window))) { |
|
|
|
else if((c = getclient(ev->window))) { |
|
|
|
focus(c); |
|
|
|
focus(c); |
|
|
|
if(CLEANMASK(ev->state) != MODKEY) |
|
|
|
if(c->ismax || CLEANMASK(ev->state) != MODKEY) |
|
|
|
return; |
|
|
|
return; |
|
|
|
switch(ev->button) { |
|
|
|
if((ev->button == Button1) && ((arrange == dofloat) || c->isfloat)) { |
|
|
|
default: |
|
|
|
restack(c); |
|
|
|
break; |
|
|
|
movemouse(c); |
|
|
|
case Button1: |
|
|
|
} |
|
|
|
if(!c->ismax && (arrange == dofloat || c->isfloat)) { |
|
|
|
else if(ev->button == Button2) |
|
|
|
restack(c); |
|
|
|
|
|
|
|
movemouse(c); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case Button2: |
|
|
|
|
|
|
|
zoom(NULL); |
|
|
|
zoom(NULL); |
|
|
|
break; |
|
|
|
else if(ev->button == Button3 && ((arrange == dofloat) || c->isfloat)) { |
|
|
|
case Button3: |
|
|
|
restack(c); |
|
|
|
if(!c->ismax && (arrange == dofloat || c->isfloat)) { |
|
|
|
resizemouse(c); |
|
|
|
restack(c); |
|
|
|
|
|
|
|
resizemouse(c); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|