mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix use-after-free when closing fullscreen views
This commit is contained in:
		
							parent
							
								
									cf14f37ee2
								
							
						
					
					
						commit
						d409620a55
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -252,8 +252,12 @@ static void handle_view_destroyed(wlc_handle handle) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (view) {
 | 
						if (view) {
 | 
				
			||||||
		swayc_t *parent = destroy_view(view);
 | 
							bool fullscreen = swayc_is_fullscreen(view);
 | 
				
			||||||
		remove_view_from_scratchpad(view);
 | 
							remove_view_from_scratchpad(view);
 | 
				
			||||||
 | 
							swayc_t *parent = destroy_view(view);
 | 
				
			||||||
 | 
							if (fullscreen) {
 | 
				
			||||||
 | 
								parent->fullscreen = NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		arrange_windows(parent, -1, -1);
 | 
							arrange_windows(parent, -1, -1);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		// Is it unmanaged?
 | 
							// Is it unmanaged?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue