event.c
changeset 353 8a06efe5b563
parent 318 1b45d6f14fca
child 356 c2a65784cb71
equal deleted inserted replaced
352:5a8bdc3b37cb 353:8a06efe5b563
   103 	Arg a;
   103 	Arg a;
   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 		x = 0;
   108 		if(ev->x < modew)
       
   109 			return;
       
   110 		x = modew;
   109 		for(a.i = 0; a.i < ntags; a.i++) {
   111 		for(a.i = 0; a.i < ntags; a.i++) {
   110 			x += textw(tags[a.i]);
   112 			x += textw(tags[a.i]);
   111 			if(ev->x < x) {
   113 			if(ev->x < x) {
   112 				if(ev->button == Button1)
   114 				if(ev->button == Button1)
   113 					view(&a);
   115 					view(&a);