dwm.c
changeset 998 854a324f5c92
parent 997 8e721021e636
child 999 d036b2f17567
equal deleted inserted replaced
997:8e721021e636 998:854a324f5c92
   333 	}
   333 	}
   334 	else if((c = getclient(ev->window))) {
   334 	else if((c = getclient(ev->window))) {
   335 		focus(c);
   335 		focus(c);
   336 		if(CLEANMASK(ev->state) != MODKEY)
   336 		if(CLEANMASK(ev->state) != MODKEY)
   337 			return;
   337 			return;
   338 		if(ev->button == Button1 && (isarrange(floating) || c->isfloating)) {
   338 		if(ev->button == Button1) {
   339 			restack();
   339 			if(!isarrange(floating) && !c->isfloating)
       
   340 				togglefloating(NULL);
       
   341 			else
       
   342 				restack();
   340 			movemouse(c);
   343 			movemouse(c);
   341 		}
   344 		}
   342 		else if(ev->button == Button2)
   345 		else if(ev->button == Button2)
   343 			zoom(NULL);
   346 			zoom(NULL);
   344 		else if(ev->button == Button3
   347 		else if(ev->button == Button3 && !c->isfixed) {
   345 		&& (isarrange(floating) || c->isfloating) && !c->isfixed)
   348 			if(!isarrange(floating) && !c->isfloating)
   346 		{
   349 				togglefloating(NULL);
   347 			restack();
   350 			else
       
   351 				restack();
   348 			resizemouse(c);
   352 			resizemouse(c);
   349 		}
   353 		}
   350 	}
   354 	}
   351 }
   355 }
   352 
   356