comparison event.c @ 356:c2a65784cb71

changed symbols for float/tiled mode, added mouse-driven mode toggle to buttonpress()
author Anselm R. Garbe <arg@10kloc.org>
date Fri, 25 Aug 2006 15:06:38 +0200
parents 8a06efe5b563
children ba6c55e1b9b2
comparison
equal deleted inserted replaced
355:f9543a4af9e5 356:c2a65784cb71
104 Client *c; 104 Client *c;
105 XButtonPressedEvent *ev = &e->xbutton; 105 XButtonPressedEvent *ev = &e->xbutton;
106 106
107 if(barwin == ev->window) { 107 if(barwin == ev->window) {
108 if(ev->x < modew) 108 if(ev->x < modew)
109 return; 109 togglemode(NULL);
110 x = modew; 110 else {
111 for(a.i = 0; a.i < ntags; a.i++) { 111 x = modew;
112 x += textw(tags[a.i]); 112 for(a.i = 0; a.i < ntags; a.i++) {
113 if(ev->x < x) { 113 x += textw(tags[a.i]);
114 if(ev->button == Button1) 114 if(ev->x < x) {
115 view(&a); 115 if(ev->button == Button1)
116 else if(ev->button == Button3) 116 view(&a);
117 toggleview(&a); 117 else if(ev->button == Button3)
118 return; 118 toggleview(&a);
119 return;
120 }
119 } 121 }
120 } 122 }
121 } 123 }
122 else if((c = getclient(ev->window))) { 124 else if((c = getclient(ev->window))) {
123 focus(c); 125 focus(c);