mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Revert "also check floating cons in container_find"
This commit is contained in:
		
							parent
							
								
									ce713efcd2
								
							
						
					
					
						commit
						f30f60dad8
					
				
					 1 changed files with 5 additions and 20 deletions
				
			
		| 
						 | 
					@ -729,29 +729,14 @@ swayc_t *container_find(swayc_t *container, bool (*f)(swayc_t *, const void *),
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	swayc_t *con;
 | 
					 | 
				
			||||||
	if (container->type == C_WORKSPACE) {
 | 
					 | 
				
			||||||
		for (int i = 0; i < container->floating->length; ++i) {
 | 
					 | 
				
			||||||
			con = container->floating->items[i];
 | 
					 | 
				
			||||||
			if (f(con, data)) {
 | 
					 | 
				
			||||||
				return con;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			con = container_find(con, f, data);
 | 
					 | 
				
			||||||
			if (con != NULL) {
 | 
					 | 
				
			||||||
				return con;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	for (int i = 0; i < container->children->length; ++i) {
 | 
						for (int i = 0; i < container->children->length; ++i) {
 | 
				
			||||||
		con = container->children->items[i];
 | 
							if (f(container->children->items[i], data)) {
 | 
				
			||||||
		if (f(con, data)) {
 | 
								return container->children->items[i];
 | 
				
			||||||
			return con;
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		con = container_find(con, f, data);
 | 
							swayc_t *find = container_find(container->children->items[i], f, data);
 | 
				
			||||||
		if (con != NULL) {
 | 
							if (find != NULL) {
 | 
				
			||||||
			return con;
 | 
								return find;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue