diff options
Diffstat (limited to 'sway/server.c')
-rw-r--r-- | sway/server.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sway/server.c b/sway/server.c index f51fcfe2..2e5ab104 100644 --- a/sway/server.c +++ b/sway/server.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <wlr/backend/multi.h> | 9 | #include <wlr/backend/multi.h> |
10 | #include <wlr/backend/noop.h> | 10 | #include <wlr/backend/noop.h> |
11 | #include <wlr/backend/session.h> | 11 | #include <wlr/backend/session.h> |
12 | #include <wlr/config.h> | ||
12 | #include <wlr/render/wlr_renderer.h> | 13 | #include <wlr/render/wlr_renderer.h> |
13 | #include <wlr/types/wlr_compositor.h> | 14 | #include <wlr/types/wlr_compositor.h> |
14 | #include <wlr/types/wlr_data_control_v1.h> | 15 | #include <wlr/types/wlr_data_control_v1.h> |
@@ -24,7 +25,11 @@ | |||
24 | #include <wlr/types/wlr_tablet_v2.h> | 25 | #include <wlr/types/wlr_tablet_v2.h> |
25 | #include <wlr/types/wlr_viewporter.h> | 26 | #include <wlr/types/wlr_viewporter.h> |
26 | #include <wlr/types/wlr_xcursor_manager.h> | 27 | #include <wlr/types/wlr_xcursor_manager.h> |
28 | #include <wlr/types/wlr_xdg_activation_v1.h> | ||
27 | #include <wlr/types/wlr_xdg_decoration_v1.h> | 29 | #include <wlr/types/wlr_xdg_decoration_v1.h> |
30 | #include <wlr/types/wlr_xdg_foreign_registry.h> | ||
31 | #include <wlr/types/wlr_xdg_foreign_v1.h> | ||
32 | #include <wlr/types/wlr_xdg_foreign_v2.h> | ||
28 | #include <wlr/types/wlr_xdg_output_v1.h> | 33 | #include <wlr/types/wlr_xdg_output_v1.h> |
29 | #include "config.h" | 34 | #include "config.h" |
30 | #include "list.h" | 35 | #include "list.h" |
@@ -150,6 +155,17 @@ bool server_init(struct sway_server *server) { | |||
150 | wlr_primary_selection_v1_device_manager_create(server->wl_display); | 155 | wlr_primary_selection_v1_device_manager_create(server->wl_display); |
151 | wlr_viewporter_create(server->wl_display); | 156 | wlr_viewporter_create(server->wl_display); |
152 | 157 | ||
158 | struct wlr_xdg_foreign_registry *foreign_registry = | ||
159 | wlr_xdg_foreign_registry_create(server->wl_display); | ||
160 | wlr_xdg_foreign_v1_create(server->wl_display, foreign_registry); | ||
161 | wlr_xdg_foreign_v2_create(server->wl_display, foreign_registry); | ||
162 | |||
163 | server->xdg_activation_v1 = wlr_xdg_activation_v1_create(server->wl_display); | ||
164 | server->xdg_activation_v1_request_activate.notify = | ||
165 | xdg_activation_v1_handle_request_activate; | ||
166 | wl_signal_add(&server->xdg_activation_v1->events.request_activate, | ||
167 | &server->xdg_activation_v1_request_activate); | ||
168 | |||
153 | // Avoid using "wayland-0" as display socket | 169 | // Avoid using "wayland-0" as display socket |
154 | char name_candidate[16]; | 170 | char name_candidate[16]; |
155 | for (int i = 1; i <= 32; ++i) { | 171 | for (int i = 1; i <= 32; ++i) { |
@@ -186,7 +202,6 @@ bool server_init(struct sway_server *server) { | |||
186 | } | 202 | } |
187 | 203 | ||
188 | server->dirty_nodes = create_list(); | 204 | server->dirty_nodes = create_list(); |
189 | server->transactions = create_list(); | ||
190 | 205 | ||
191 | server->input = input_manager_create(server); | 206 | server->input = input_manager_create(server); |
192 | input_manager_get_default_seat(); // create seat0 | 207 | input_manager_get_default_seat(); // create seat0 |
@@ -202,7 +217,6 @@ void server_fini(struct sway_server *server) { | |||
202 | wl_display_destroy_clients(server->wl_display); | 217 | wl_display_destroy_clients(server->wl_display); |
203 | wl_display_destroy(server->wl_display); | 218 | wl_display_destroy(server->wl_display); |
204 | list_free(server->dirty_nodes); | 219 | list_free(server->dirty_nodes); |
205 | list_free(server->transactions); | ||
206 | } | 220 | } |
207 | 221 | ||
208 | bool server_start(struct sway_server *server) { | 222 | bool server_start(struct sway_server *server) { |