summaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--event.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/event.c b/event.c
index e948cb3..ecbb8d2 100644
--- a/event.c
+++ b/event.c
@@ -14,8 +14,8 @@
14/********** CUSTOMIZE **********/ 14/********** CUSTOMIZE **********/
15 15
16const char *term[] = { 16const char *term[] = {
17 "urxvtc", "-tr", "+sb", "-bg", "black", "-fg", "white", "-fn", 17 "urxvtc", "-tr", "+sb", "-bg", "black", "-fg", "white", "-cr", "white",
18 "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*",NULL 18 "-fn", "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*", NULL
19}; 19};
20const char *browse[] = { "firefox", NULL }; 20const char *browse[] = { "firefox", NULL };
21const char *xlock[] = { "xlock", NULL }; 21const char *xlock[] = { "xlock", NULL };
@@ -128,18 +128,34 @@ buttonpress(XEvent *e)
128 Client *c; 128 Client *c;
129 129
130 if(barwin == ev->window) { 130 if(barwin == ev->window) {
131 x = 0; 131 switch(ev->button) {
132 for(a.i = 0; a.i < TLast; a.i++) { 132 default:
133 x += textw(tags[a.i]); 133 x = 0;
134 if(ev->x < x) { 134 for(a.i = 0; a.i < TLast; a.i++) {
135 view(&a); 135 x += textw(tags[a.i]);
136 break; 136 if(ev->x < x) {
137 view(&a);
138 break;
139 }
137 } 140 }
141 break;
142 case Button4:
143 a.i = (tsel + 1 < TLast) ? tsel + 1 : 0;
144 view(&a);
145 break;
146 case Button5:
147 a.i = (tsel - 1 >= 0) ? tsel - 1 : TLast - 1;
148 view(&a);
149 break;
138 } 150 }
139 } 151 }
140 else if((c = getclient(ev->window))) { 152 else if((c = getclient(ev->window))) {
141 if(arrange == dotile && !c->dofloat) 153 if(arrange == dotile && !c->isfloat) {
154 if((ev->state & ControlMask) && (ev->button == Button1))
155 zoom(NULL);
142 return; 156 return;
157 }
158 /* floating windows */
143 higher(c); 159 higher(c);
144 switch(ev->button) { 160 switch(ev->button) {
145 default: 161 default:
@@ -297,7 +313,7 @@ propertynotify(XEvent *e)
297 default: break; 313 default: break;
298 case XA_WM_TRANSIENT_FOR: 314 case XA_WM_TRANSIENT_FOR:
299 XGetTransientForHint(dpy, c->win, &trans); 315 XGetTransientForHint(dpy, c->win, &trans);
300 if(!c->dofloat && (c->dofloat = (trans != 0))) 316 if(!c->isfloat && (c->isfloat = (trans != 0)))
301 arrange(NULL); 317 arrange(NULL);
302 break; 318 break;
303 case XA_WM_NORMAL_HINTS: 319 case XA_WM_NORMAL_HINTS: