mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-10-31 03:54:15 +00:00 
			
		
		
		
	focusclient checks whether oldsel == sel
No need to do it outside the call.
This commit is contained in:
		
							parent
							
								
									ef7a37649c
								
							
						
					
					
						commit
						59cd8dec94
					
				
							
								
								
									
										7
									
								
								dwl.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								dwl.c
									
									
									
									
									
								
							| @ -718,11 +718,8 @@ void | ||||
| focusmon(const Arg *arg) | ||||
| { | ||||
| 	Client *sel = selclient(); | ||||
| 	Monitor *m = dirtomon(arg->i); | ||||
| 
 | ||||
| 	if (m == selmon) | ||||
| 		return; | ||||
| 	selmon = m; | ||||
| 	selmon = dirtomon(arg->i); | ||||
| 	focusclient(sel, focustop(selmon), 1); | ||||
| } | ||||
| 
 | ||||
| @ -1437,8 +1434,6 @@ setmon(Client *c, Monitor *m, unsigned int newtags) | ||||
| 		c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */ | ||||
| 		arrange(m); | ||||
| 	} | ||||
| 	/* Focus can change if c is the top of selmon before or after */ | ||||
| 	if (c == oldsel || c == selclient()) | ||||
| 	focusclient(oldsel, focustop(selmon), 1); | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Devin J. Pohly
						Devin J. Pohly