mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix move perpendicular segfault
This commit is contained in:
		
							parent
							
								
									4495ec64b2
								
							
						
					
					
						commit
						8237d944d4
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -521,7 +521,6 @@ void container_move(struct sway_container *container,
 | 
				
			||||||
				sibling = NULL;
 | 
									sibling = NULL;
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				wlr_log(L_DEBUG, "Reparenting container (perpendicular)");
 | 
									wlr_log(L_DEBUG, "Reparenting container (perpendicular)");
 | 
				
			||||||
				container_remove_child(container);
 | 
					 | 
				
			||||||
				struct sway_container *focus_inactive = seat_get_focus_inactive(
 | 
									struct sway_container *focus_inactive = seat_get_focus_inactive(
 | 
				
			||||||
						config->handler_context.seat, sibling);
 | 
											config->handler_context.seat, sibling);
 | 
				
			||||||
				if (focus_inactive) {
 | 
									if (focus_inactive) {
 | 
				
			||||||
| 
						 | 
					@ -534,9 +533,11 @@ void container_move(struct sway_container *container,
 | 
				
			||||||
					continue;
 | 
										continue;
 | 
				
			||||||
				} else if (sibling->children->length) {
 | 
									} else if (sibling->children->length) {
 | 
				
			||||||
					wlr_log(L_DEBUG, "No focus-inactive, adding arbitrarily");
 | 
										wlr_log(L_DEBUG, "No focus-inactive, adding arbitrarily");
 | 
				
			||||||
 | 
										container_remove_child(container);
 | 
				
			||||||
					container_add_sibling(sibling->children->items[0], container);
 | 
										container_add_sibling(sibling->children->items[0], container);
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					wlr_log(L_DEBUG, "No kiddos, adding container alone");
 | 
										wlr_log(L_DEBUG, "No kiddos, adding container alone");
 | 
				
			||||||
 | 
										container_remove_child(container);
 | 
				
			||||||
					container_add_child(sibling, container);
 | 
										container_add_child(sibling, container);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				container->width = container->height = 0;
 | 
									container->width = container->height = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue