diff options
author | 2023-11-23 13:08:53 +0100 | |
---|---|---|
committer | 2023-11-23 16:13:19 +0300 | |
commit | 128b6253a924c30e8e4fd1f09ce19e21a826c5ad (patch) | |
tree | 7aa939c599b9185cecc2562b37387367fca05fbb | |
parent | Add wlr/util/transform.h includes (diff) | |
download | sway-128b6253a924c30e8e4fd1f09ce19e21a826c5ad.tar.gz sway-128b6253a924c30e8e4fd1f09ce19e21a826c5ad.tar.zst sway-128b6253a924c30e8e4fd1f09ce19e21a826c5ad.zip |
Pass wl_display to wlr_output_layout
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4310
-rw-r--r-- | include/sway/tree/root.h | 2 | ||||
-rw-r--r-- | sway/main.c | 2 | ||||
-rw-r--r-- | sway/server.c | 2 | ||||
-rw-r--r-- | sway/tree/root.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h index a2c088e7..b3dda12f 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h | |||
@@ -41,7 +41,7 @@ struct sway_root { | |||
41 | } events; | 41 | } events; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | struct sway_root *root_create(void); | 44 | struct sway_root *root_create(struct wl_display *display); |
45 | 45 | ||
46 | void root_destroy(struct sway_root *root); | 46 | void root_destroy(struct sway_root *root); |
47 | 47 | ||
diff --git a/sway/main.c b/sway/main.c index 85bc2f1c..23689757 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -375,8 +375,6 @@ int main(int argc, char **argv) { | |||
375 | 375 | ||
376 | sway_log(SWAY_INFO, "Starting sway version " SWAY_VERSION); | 376 | sway_log(SWAY_INFO, "Starting sway version " SWAY_VERSION); |
377 | 377 | ||
378 | root = root_create(); | ||
379 | |||
380 | if (!server_init(&server)) { | 378 | if (!server_init(&server)) { |
381 | return 1; | 379 | return 1; |
382 | } | 380 | } |
diff --git a/sway/server.c b/sway/server.c index de70e0ab..e4f8a7c8 100644 --- a/sway/server.c +++ b/sway/server.c | |||
@@ -120,6 +120,8 @@ bool server_init(struct sway_server *server) { | |||
120 | 120 | ||
121 | wl_display_set_global_filter(server->wl_display, filter_global, NULL); | 121 | wl_display_set_global_filter(server->wl_display, filter_global, NULL); |
122 | 122 | ||
123 | root = root_create(server->wl_display); | ||
124 | |||
123 | server->backend = wlr_backend_autocreate(server->wl_display, &server->session); | 125 | server->backend = wlr_backend_autocreate(server->wl_display, &server->session); |
124 | if (!server->backend) { | 126 | if (!server->backend) { |
125 | sway_log(SWAY_ERROR, "Unable to create backend"); | 127 | sway_log(SWAY_ERROR, "Unable to create backend"); |
diff --git a/sway/tree/root.c b/sway/tree/root.c index 66008d30..478df00c 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c | |||
@@ -24,14 +24,14 @@ static void output_layout_handle_change(struct wl_listener *listener, | |||
24 | transaction_commit_dirty(); | 24 | transaction_commit_dirty(); |
25 | } | 25 | } |
26 | 26 | ||
27 | struct sway_root *root_create(void) { | 27 | struct sway_root *root_create(struct wl_display *wl_display) { |
28 | struct sway_root *root = calloc(1, sizeof(struct sway_root)); | 28 | struct sway_root *root = calloc(1, sizeof(struct sway_root)); |
29 | if (!root) { | 29 | if (!root) { |
30 | sway_log(SWAY_ERROR, "Unable to allocate sway_root"); | 30 | sway_log(SWAY_ERROR, "Unable to allocate sway_root"); |
31 | return NULL; | 31 | return NULL; |
32 | } | 32 | } |
33 | node_init(&root->node, N_ROOT, root); | 33 | node_init(&root->node, N_ROOT, root); |
34 | root->output_layout = wlr_output_layout_create(); | 34 | root->output_layout = wlr_output_layout_create(wl_display); |
35 | wl_list_init(&root->all_outputs); | 35 | wl_list_init(&root->all_outputs); |
36 | #if HAVE_XWAYLAND | 36 | #if HAVE_XWAYLAND |
37 | wl_list_init(&root->xwayland_unmanaged); | 37 | wl_list_init(&root->xwayland_unmanaged); |