mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	output-management-v1: add assertion as a safety net
Makes it easier to figure out when the compositor submits an invalid output state. References: https://github.com/swaywm/sway/pull/4673
This commit is contained in:
		
							parent
							
								
									0e57effd38
								
							
						
					
					
						commit
						9971db02ff
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -686,6 +686,9 @@ static void head_send_state(struct wlr_output_head_v1 *head,
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	if (state & HEAD_STATE_MODE) {
 | 
			
		||||
		assert(head->state.mode != NULL ||
 | 
			
		||||
			wl_list_empty(&head->state.output->modes));
 | 
			
		||||
 | 
			
		||||
		bool found = false;
 | 
			
		||||
		struct wl_resource *mode_resource;
 | 
			
		||||
		wl_resource_for_each(mode_resource, &head->mode_resources) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue