Introduction
Introduction Statistics Contact Development Disclaimer Help
tsimplified buttonpress - dwm - [fork] customized build of dwm, the dynamic win…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 6d22782e8f991a99f9adef56b2b729e5ab5454d2
parent 1836b6740d7fc1a2e7fa0343aa7de657592ebfeb
Author: Anselm R. Garbe <[email protected]>
Date: Fri, 1 Sep 2006 15:31:59 +0200
simplified buttonpress
Diffstat:
M event.c | 35 +++++++++++------------------…
1 file changed, 12 insertions(+), 23 deletions(-)
---
diff --git a/event.c b/event.c
t@@ -109,19 +109,17 @@ buttonpress(XEvent *e)
for(a.i = 0; a.i < ntags; a.i++) {
x += textw(tags[a.i]);
if(ev->x < x) {
- switch(ev->button) {
- case Button1:
+ if(ev->button == Button1) {
if(ev->state & MODKEY)
tag(&a);
else
view(&a);
- break;
- case Button3:
+ }
+ else if(ev->button == Button3) {
if(ev->state & MODKEY)
toggletag(&a);
else
toggleview(&a);
- break;
}
return;
}
t@@ -133,26 +131,17 @@ buttonpress(XEvent *e)
}
else if((c = getclient(ev->window))) {
focus(c);
- if(CLEANMASK(ev->state) != MODKEY)
+ if(c->ismax || CLEANMASK(ev->state) != MODKEY)
return;
- switch(ev->button) {
- default:
- break;
- case Button1:
- if(!c->ismax && (arrange == dofloat || c->isfloat)) {
- restack(c);
- movemouse(c);
- }
- break;
- case Button2:
+ if((ev->button == Button1) && ((arrange == dofloat) || c->isfl…
+ restack(c);
+ movemouse(c);
+ }
+ else if(ev->button == Button2)
zoom(NULL);
- break;
- case Button3:
- if(!c->ismax && (arrange == dofloat || c->isfloat)) {
- restack(c);
- resizemouse(c);
- }
- break;
+ else if(ev->button == Button3 && ((arrange == dofloat) || c->i…
+ restack(c);
+ resizemouse(c);
}
}
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.