mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	output: do not call wlr_scene_output_layout_add_output() twice
Fixes an assertion failure that occurred if reconfiguring outputs after an output had been disabled using wlopm --off. Fixes: #1303
This commit is contained in:
		
							parent
							
								
									17cbfb7299
								
							
						
					
					
						commit
						447c67df62
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		
							
								
								
									
										10
									
								
								src/output.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/output.c
									
										
									
									
									
								
							| 
						 | 
					@ -158,10 +158,14 @@ add_output_to_layout(struct server *server, struct output *output)
 | 
				
			||||||
			wlr_log(WLR_ERROR, "unable to create scene output");
 | 
								wlr_log(WLR_ERROR, "unable to create scene output");
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							/*
 | 
				
			||||||
 | 
							 * Note: wlr_scene_output_layout_add_output() is not
 | 
				
			||||||
 | 
							 * safe to call twice, so we call it only when initially
 | 
				
			||||||
 | 
							 * creating the scene_output.
 | 
				
			||||||
 | 
							 */
 | 
				
			||||||
 | 
							wlr_scene_output_layout_add_output(server->scene_layout,
 | 
				
			||||||
 | 
								layout_output, output->scene_output);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	wlr_scene_output_layout_add_output(server->scene_layout, layout_output,
 | 
					 | 
				
			||||||
		output->scene_output);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue