mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: automatically use wlr_output_group for tiled outputs
This commit is contained in:
		
							parent
							
								
									2a697512d7
								
							
						
					
					
						commit
						e9124b8a9a
					
				
					 1 changed files with 14 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1873,10 +1873,20 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
 | 
			
		|||
 | 
			
		||||
	for (size_t i = 0; i < new_outputs_len; ++i) {
 | 
			
		||||
		struct wlr_drm_connector *conn = new_outputs[i];
 | 
			
		||||
 | 
			
		||||
		wlr_drm_conn_log(conn, WLR_INFO, "Requesting modeset");
 | 
			
		||||
		wl_signal_emit_mutable(&drm->backend.events.new_output,
 | 
			
		||||
			&conn->output);
 | 
			
		||||
		if(conn->tile_info.group_id) {
 | 
			
		||||
			struct wlr_output_group *group = wlr_output_group_match_tile(&conn->tile_info);
 | 
			
		||||
			if (group) {
 | 
			
		||||
				wlr_drm_conn_log(conn, WLR_INFO, "Adding %s to existing group", conn->name);
 | 
			
		||||
			} else {
 | 
			
		||||
				wlr_drm_conn_log(conn, WLR_INFO, "Creating output group for %s", conn->name);
 | 
			
		||||
				group = wlr_output_group_create();
 | 
			
		||||
			}
 | 
			
		||||
			wlr_output_group_add_tile(group, &conn->output, &conn->tile_info);
 | 
			
		||||
		} else {
 | 
			
		||||
			wlr_drm_conn_log(conn, WLR_INFO, "Requesting modeset");
 | 
			
		||||
			wl_signal_emit_mutable(&drm->backend.events.new_output,
 | 
			
		||||
				&conn->output);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue