mirror of
				https://github.com/cage-kiosk/cage.git
				synced 2025-10-29 05:40:19 -04:00 
			
		
		
		
	output: ensure output is marked as enabled before trying to set mode
Otherwise, testing to set preferred / "best" mode will always return an error. Consequently, output will simply be configured with last and probably "worst" mode.
This commit is contained in:
		
							parent
							
								
									96ffaa340e
								
							
						
					
					
						commit
						a769943447
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		
							
								
								
									
										3
									
								
								output.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								output.c
									
										
									
									
									
								
							|  | @ -287,6 +287,9 @@ handle_new_output(struct wl_listener *listener, void *data) | ||||||
| 	wl_signal_add(&wlr_output->events.frame, &output->frame); | 	wl_signal_add(&wlr_output->events.frame, &output->frame); | ||||||
| 
 | 
 | ||||||
| 	if (!wl_list_empty(&wlr_output->modes)) { | 	if (!wl_list_empty(&wlr_output->modes)) { | ||||||
|  | 		/* Ensure the output is marked as enabled before trying to set mode */ | ||||||
|  | 		wlr_output_enable(wlr_output, true); | ||||||
|  | 
 | ||||||
| 		struct wlr_output_mode *preferred_mode = wlr_output_preferred_mode(wlr_output); | 		struct wlr_output_mode *preferred_mode = wlr_output_preferred_mode(wlr_output); | ||||||
| 		if (preferred_mode) { | 		if (preferred_mode) { | ||||||
| 			wlr_output_set_mode(wlr_output, preferred_mode); | 			wlr_output_set_mode(wlr_output, preferred_mode); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jonathan GUILLOT
						Jonathan GUILLOT