mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-10-31 20:14:20 +00:00 
			
		
		
		
	use the new frame scheduler (wlroots!4307)
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4307
This commit is contained in:
		
							parent
							
								
									05c263de45
								
							
						
					
					
						commit
						2b454daa14
					
				
							
								
								
									
										10
									
								
								dwl.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								dwl.c
									
									
									
									
									
								
							| @ -23,6 +23,7 @@ | |||||||
| #include <wlr/types/wlr_drm.h> | #include <wlr/types/wlr_drm.h> | ||||||
| #include <wlr/types/wlr_export_dmabuf_v1.h> | #include <wlr/types/wlr_export_dmabuf_v1.h> | ||||||
| #include <wlr/types/wlr_fractional_scale_v1.h> | #include <wlr/types/wlr_fractional_scale_v1.h> | ||||||
|  | #include <wlr/types/wlr_frame_scheduler.h> | ||||||
| #include <wlr/types/wlr_gamma_control_v1.h> | #include <wlr/types/wlr_gamma_control_v1.h> | ||||||
| #include <wlr/types/wlr_idle_inhibit_v1.h> | #include <wlr/types/wlr_idle_inhibit_v1.h> | ||||||
| #include <wlr/types/wlr_idle_notify_v1.h> | #include <wlr/types/wlr_idle_notify_v1.h> | ||||||
| @ -881,8 +882,10 @@ createmon(struct wl_listener *listener, void *data) | |||||||
| 	 * the user configure it. */ | 	 * the user configure it. */ | ||||||
| 	wlr_output_state_set_mode(&state, wlr_output_preferred_mode(wlr_output)); | 	wlr_output_state_set_mode(&state, wlr_output_preferred_mode(wlr_output)); | ||||||
| 
 | 
 | ||||||
|  | 	m->scene_output = wlr_scene_output_create(scene, wlr_output); | ||||||
|  | 
 | ||||||
| 	/* Set up event listeners */ | 	/* Set up event listeners */ | ||||||
| 	LISTEN(&wlr_output->events.frame, &m->frame, rendermon); | 	LISTEN(&m->scene_output->frame_scheduler->events.frame, &m->frame, rendermon); | ||||||
| 	LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon); | 	LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon); | ||||||
| 	LISTEN(&wlr_output->events.request_state, &m->request_state, requestmonstate); | 	LISTEN(&wlr_output->events.request_state, &m->request_state, requestmonstate); | ||||||
| 
 | 
 | ||||||
| @ -911,7 +914,6 @@ createmon(struct wl_listener *listener, void *data) | |||||||
| 	 * display, which Wayland clients can see to find out information about the | 	 * display, which Wayland clients can see to find out information about the | ||||||
| 	 * output (such as DPI, scale factor, manufacturer, etc). | 	 * output (such as DPI, scale factor, manufacturer, etc). | ||||||
| 	 */ | 	 */ | ||||||
| 	m->scene_output = wlr_scene_output_create(scene, wlr_output); |  | ||||||
| 	if (m->m.x < 0 || m->m.y < 0) | 	if (m->m.x < 0 || m->m.y < 0) | ||||||
| 		wlr_output_layout_add_auto(output_layout, wlr_output); | 		wlr_output_layout_add_auto(output_layout, wlr_output); | ||||||
| 	else | 	else | ||||||
| @ -1882,7 +1884,7 @@ rendermon(struct wl_listener *listener, void *data) | |||||||
| 			goto commit; | 			goto commit; | ||||||
| 		} | 		} | ||||||
| 		wlr_output_commit_state(m->wlr_output, &pending); | 		wlr_output_commit_state(m->wlr_output, &pending); | ||||||
| 		wlr_output_schedule_frame(m->wlr_output); | 		wlr_frame_scheduler_schedule_frame(m->scene_output->frame_scheduler); | ||||||
| 	} else { | 	} else { | ||||||
| commit: | commit: | ||||||
| 		wlr_scene_output_commit(m->scene_output, NULL); | 		wlr_scene_output_commit(m->scene_output, NULL); | ||||||
| @ -2077,7 +2079,7 @@ setgamma(struct wl_listener *listener, void *data) | |||||||
| 	struct wlr_gamma_control_manager_v1_set_gamma_event *event = data; | 	struct wlr_gamma_control_manager_v1_set_gamma_event *event = data; | ||||||
| 	Monitor *m = event->output->data; | 	Monitor *m = event->output->data; | ||||||
| 	m->gamma_lut_changed = 1; | 	m->gamma_lut_changed = 1; | ||||||
| 	wlr_output_schedule_frame(m->wlr_output); | 	wlr_frame_scheduler_schedule_frame(m->scene_output->frame_scheduler); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void | void | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Leonardo Hernández Hernández
						Leonardo Hernández Hernández