mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	output: make wlr_output_schedule_frame set output->needs_frame
This way, wlr_output_schedule_frame will always be followed by a wlr_output_commit. This forces the compositor to render an extra frame before stopping the rendering loop. To test, run wleird's frame-callback [1], make sure it's the only visible client on the output and check the interval between frame events is the output's refresh period instead of zero. [1]: https://github.com/emersion/wleird/blob/master/frame-callback.c Closes: https://github.com/swaywm/wlroots/issues/2051
This commit is contained in:
		
							parent
							
								
									4bb391c896
								
							
						
					
					
						commit
						a4c7c6db09
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -621,6 +621,8 @@ static void schedule_frame_handle_idle_timer(void *data) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wlr_output_schedule_frame(struct wlr_output *output) {
 | 
					void wlr_output_schedule_frame(struct wlr_output *output) {
 | 
				
			||||||
 | 
						wlr_output_update_needs_frame(output);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (output->frame_pending || output->idle_frame != NULL) {
 | 
						if (output->frame_pending || output->idle_frame != NULL) {
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue