mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix crash when closing output window from outer session
Emitting the close event needs to happen before container_output_destroy, because container_output_destroy sets the sway_output to NULL and sway_output is used in IPC.
This commit is contained in:
		
							parent
							
								
									834805f5e2
								
							
						
					
					
						commit
						93696b78ec
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -304,6 +304,9 @@ struct sway_container *container_destroy_noreaping(struct sway_container *con) {
 | 
			
		|||
		return NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	wl_signal_emit(&con->events.destroy, con);
 | 
			
		||||
	ipc_event_window(con, "close");
 | 
			
		||||
 | 
			
		||||
	// The below functions move their children to somewhere else.
 | 
			
		||||
	if (con->type == C_OUTPUT) {
 | 
			
		||||
		container_output_destroy(con);
 | 
			
		||||
| 
						 | 
				
			
			@ -325,9 +328,6 @@ struct sway_container *container_destroy_noreaping(struct sway_container *con) {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	wl_signal_emit(&con->events.destroy, con);
 | 
			
		||||
	ipc_event_window(con, "close");
 | 
			
		||||
 | 
			
		||||
	con->destroying = true;
 | 
			
		||||
	list_add(server.destroying_containers, con);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue