mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	rootston: fix repaint timer for outputs with refresh rate
This commit is contained in:
		
							parent
							
								
									96d6f34edd
								
							
						
					
					
						commit
						7c11d3e372
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -273,11 +273,11 @@ static void output_handle_frame(struct wl_listener *listener, void *data) {
 | 
				
			||||||
	// TODO: fullscreen
 | 
						// TODO: fullscreen
 | 
				
			||||||
	if (!pixman_region32_not_empty(&output->damage) &&
 | 
						if (!pixman_region32_not_empty(&output->damage) &&
 | 
				
			||||||
			!wlr_output->needs_swap) {
 | 
								!wlr_output->needs_swap) {
 | 
				
			||||||
		int refresh = wlr_output->refresh;
 | 
							float hz = wlr_output->refresh / 1000.0f;
 | 
				
			||||||
		if (refresh <= 0) {
 | 
							if (hz <= 0) {
 | 
				
			||||||
			refresh = 60;
 | 
								hz = 60;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		wl_event_source_timer_update(output->repaint_timer, 1000.0f / refresh);
 | 
							wl_event_source_timer_update(output->repaint_timer, 1000.0f / hz);
 | 
				
			||||||
		goto clear_damage;
 | 
							goto clear_damage;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue