implemented Button2 press on tags for toggletag on the focused client
This commit is contained in:
		
							
								
								
									
										6
									
								
								dwm.1
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								dwm.1
									
									
									
									
									
								
							@@ -47,6 +47,12 @@ and
 | 
				
			|||||||
.B floating
 | 
					.B floating
 | 
				
			||||||
mode.
 | 
					mode.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
 | 
					.B Button2
 | 
				
			||||||
 | 
					click on a tag label adds/removes that
 | 
				
			||||||
 | 
					.B tag
 | 
				
			||||||
 | 
					to/from the focused
 | 
				
			||||||
 | 
					.B window.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
.B Button3
 | 
					.B Button3
 | 
				
			||||||
click on a tag label adds/removes all windows with that
 | 
					click on a tag label adds/removes all windows with that
 | 
				
			||||||
.B tag
 | 
					.B tag
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										11
									
								
								event.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								event.c
									
									
									
									
									
								
							@@ -109,10 +109,17 @@ buttonpress(XEvent *e)
 | 
				
			|||||||
		for(a.i = 0; a.i < ntags; a.i++) {
 | 
							for(a.i = 0; a.i < ntags; a.i++) {
 | 
				
			||||||
			x += textw(tags[a.i]);
 | 
								x += textw(tags[a.i]);
 | 
				
			||||||
			if(ev->x < x) {
 | 
								if(ev->x < x) {
 | 
				
			||||||
				if(ev->button == Button1)
 | 
									switch(ev->button) {
 | 
				
			||||||
 | 
									case Button1:
 | 
				
			||||||
					view(&a);
 | 
										view(&a);
 | 
				
			||||||
				else if(ev->button == Button3)
 | 
										break;
 | 
				
			||||||
 | 
									case Button2:
 | 
				
			||||||
 | 
										toggletag(&a);
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									case Button3:
 | 
				
			||||||
					toggleview(&a);
 | 
										toggleview(&a);
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				return;
 | 
									return;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user