mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-10-31 03:54:15 +00:00 
			
		
		
		
	fix: keep focused client when readding clients from off output
Fixes #1133. When a output is turned off, the clients go to another active output. When this is the last output, and the output is then reactivated in the future, the focus will be lost, because of the order the clients are iterated in. The focused client is first in the list, while the unfocused is last. This ensures the previously focused client is enumerated as last, making it the currently focused client.
This commit is contained in:
		
							parent
							
								
									faa56cc9b9
								
							
						
					
					
						commit
						99574c8041
					
				
							
								
								
									
										2
									
								
								dwl.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								dwl.c
									
									
									
									
									
								
							| @ -2915,7 +2915,7 @@ updatemons(struct wl_listener *listener, void *data) | |||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (selmon && selmon->wlr_output->enabled) { | 	if (selmon && selmon->wlr_output->enabled) { | ||||||
| 		wl_list_for_each(c, &clients, link) { | 		wl_list_for_each_reverse(c, &clients, link) { | ||||||
| 			if (!c->mon && client_surface(c)->mapped) | 			if (!c->mon && client_surface(c)->mapped) | ||||||
| 				setmon(c, selmon, c->tags); | 				setmon(c, selmon, c->tags); | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Rutherther
						Rutherther