mirror of
				https://github.com/swaywm/sway.git
				synced 2025-10-29 05:40:18 -04:00 
			
		
		
		
	Pass wl_display to wlr_output_layout
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4310
This commit is contained in:
		
							parent
							
								
									fd6d6f1d97
								
							
						
					
					
						commit
						128b6253a9
					
				
					 4 changed files with 5 additions and 5 deletions
				
			
		|  | @ -41,7 +41,7 @@ struct sway_root { | ||||||
| 	} events; | 	} events; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| struct sway_root *root_create(void); | struct sway_root *root_create(struct wl_display *display); | ||||||
| 
 | 
 | ||||||
| void root_destroy(struct sway_root *root); | void root_destroy(struct sway_root *root); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -375,8 +375,6 @@ int main(int argc, char **argv) { | ||||||
| 
 | 
 | ||||||
| 	sway_log(SWAY_INFO, "Starting sway version " SWAY_VERSION); | 	sway_log(SWAY_INFO, "Starting sway version " SWAY_VERSION); | ||||||
| 
 | 
 | ||||||
| 	root = root_create(); |  | ||||||
| 
 |  | ||||||
| 	if (!server_init(&server)) { | 	if (!server_init(&server)) { | ||||||
| 		return 1; | 		return 1; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -120,6 +120,8 @@ bool server_init(struct sway_server *server) { | ||||||
| 
 | 
 | ||||||
| 	wl_display_set_global_filter(server->wl_display, filter_global, NULL); | 	wl_display_set_global_filter(server->wl_display, filter_global, NULL); | ||||||
| 
 | 
 | ||||||
|  | 	root = root_create(server->wl_display); | ||||||
|  | 
 | ||||||
| 	server->backend = wlr_backend_autocreate(server->wl_display, &server->session); | 	server->backend = wlr_backend_autocreate(server->wl_display, &server->session); | ||||||
| 	if (!server->backend) { | 	if (!server->backend) { | ||||||
| 		sway_log(SWAY_ERROR, "Unable to create backend"); | 		sway_log(SWAY_ERROR, "Unable to create backend"); | ||||||
|  |  | ||||||
|  | @ -24,14 +24,14 @@ static void output_layout_handle_change(struct wl_listener *listener, | ||||||
| 	transaction_commit_dirty(); | 	transaction_commit_dirty(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| struct sway_root *root_create(void) { | struct sway_root *root_create(struct wl_display *wl_display) { | ||||||
| 	struct sway_root *root = calloc(1, sizeof(struct sway_root)); | 	struct sway_root *root = calloc(1, sizeof(struct sway_root)); | ||||||
| 	if (!root) { | 	if (!root) { | ||||||
| 		sway_log(SWAY_ERROR, "Unable to allocate sway_root"); | 		sway_log(SWAY_ERROR, "Unable to allocate sway_root"); | ||||||
| 		return NULL; | 		return NULL; | ||||||
| 	} | 	} | ||||||
| 	node_init(&root->node, N_ROOT, root); | 	node_init(&root->node, N_ROOT, root); | ||||||
| 	root->output_layout = wlr_output_layout_create(); | 	root->output_layout = wlr_output_layout_create(wl_display); | ||||||
| 	wl_list_init(&root->all_outputs); | 	wl_list_init(&root->all_outputs); | ||||||
| #if HAVE_XWAYLAND | #if HAVE_XWAYLAND | ||||||
| 	wl_list_init(&root->xwayland_unmanaged); | 	wl_list_init(&root->xwayland_unmanaged); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Ser
						Simon Ser