diff options
Diffstat (limited to 'sway/server.c')
-rw-r--r-- | sway/server.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sway/server.c b/sway/server.c index d159dc9b..edbc1a4b 100644 --- a/sway/server.c +++ b/sway/server.c | |||
@@ -56,7 +56,7 @@ | |||
56 | #include "sway/input/cursor.h" | 56 | #include "sway/input/cursor.h" |
57 | #include "sway/tree/root.h" | 57 | #include "sway/tree/root.h" |
58 | 58 | ||
59 | #if HAVE_XWAYLAND | 59 | #if WLR_HAS_XWAYLAND |
60 | #include <wlr/xwayland/shell.h> | 60 | #include <wlr/xwayland/shell.h> |
61 | #include "sway/xwayland.h" | 61 | #include "sway/xwayland.h" |
62 | #endif | 62 | #endif |
@@ -113,12 +113,13 @@ static bool is_privileged(const struct wl_global *global) { | |||
113 | global == server.input->keyboard_shortcuts_inhibit->global || | 113 | global == server.input->keyboard_shortcuts_inhibit->global || |
114 | global == server.input->virtual_keyboard->global || | 114 | global == server.input->virtual_keyboard->global || |
115 | global == server.input->virtual_pointer->global || | 115 | global == server.input->virtual_pointer->global || |
116 | global == server.input->transient_seat_manager->global; | 116 | global == server.input->transient_seat_manager->global || |
117 | global == server.xdg_output_manager_v1->global; | ||
117 | } | 118 | } |
118 | 119 | ||
119 | static bool filter_global(const struct wl_client *client, | 120 | static bool filter_global(const struct wl_client *client, |
120 | const struct wl_global *global, void *data) { | 121 | const struct wl_global *global, void *data) { |
121 | #if HAVE_XWAYLAND | 122 | #if WLR_HAS_XWAYLAND |
122 | struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland; | 123 | struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland; |
123 | if (xwayland && global == xwayland->shell_v1->global) { | 124 | if (xwayland && global == xwayland->shell_v1->global) { |
124 | return xwayland->server != NULL && client == xwayland->server->client; | 125 | return xwayland->server != NULL && client == xwayland->server->client; |
@@ -240,13 +241,12 @@ bool server_init(struct sway_server *server) { | |||
240 | 241 | ||
241 | wlr_renderer_init_wl_shm(server->renderer, server->wl_display); | 242 | wlr_renderer_init_wl_shm(server->renderer, server->wl_display); |
242 | 243 | ||
243 | if (wlr_renderer_get_dmabuf_texture_formats(server->renderer) != NULL) { | 244 | if (wlr_renderer_get_texture_formats(server->renderer, WLR_BUFFER_CAP_DMABUF) != NULL) { |
244 | server->linux_dmabuf_v1 = wlr_linux_dmabuf_v1_create_with_renderer( | 245 | server->linux_dmabuf_v1 = wlr_linux_dmabuf_v1_create_with_renderer( |
245 | server->wl_display, 4, server->renderer); | 246 | server->wl_display, 4, server->renderer); |
246 | } | 247 | if (debug.legacy_wl_drm) { |
247 | if (wlr_renderer_get_dmabuf_texture_formats(server->renderer) != NULL && | 248 | wlr_drm_create(server->wl_display, server->renderer); |
248 | debug.legacy_wl_drm) { | 249 | } |
249 | wlr_drm_create(server->wl_display, server->renderer); | ||
250 | } | 250 | } |
251 | 251 | ||
252 | server->allocator = wlr_allocator_autocreate(server->backend, | 252 | server->allocator = wlr_allocator_autocreate(server->backend, |
@@ -276,7 +276,8 @@ bool server_init(struct sway_server *server) { | |||
276 | wl_signal_add(&root->output_layout->events.change, | 276 | wl_signal_add(&root->output_layout->events.change, |
277 | &server->output_layout_change); | 277 | &server->output_layout_change); |
278 | 278 | ||
279 | wlr_xdg_output_manager_v1_create(server->wl_display, root->output_layout); | 279 | server->xdg_output_manager_v1 = |
280 | wlr_xdg_output_manager_v1_create(server->wl_display, root->output_layout); | ||
280 | 281 | ||
281 | server->idle_notifier_v1 = wlr_idle_notifier_v1_create(server->wl_display); | 282 | server->idle_notifier_v1 = wlr_idle_notifier_v1_create(server->wl_display); |
282 | sway_idle_inhibit_manager_v1_init(); | 283 | sway_idle_inhibit_manager_v1_init(); |
@@ -438,7 +439,7 @@ bool server_init(struct sway_server *server) { | |||
438 | 439 | ||
439 | void server_fini(struct sway_server *server) { | 440 | void server_fini(struct sway_server *server) { |
440 | // TODO: free sway-specific resources | 441 | // TODO: free sway-specific resources |
441 | #if HAVE_XWAYLAND | 442 | #if WLR_HAS_XWAYLAND |
442 | wlr_xwayland_destroy(server->xwayland.wlr_xwayland); | 443 | wlr_xwayland_destroy(server->xwayland.wlr_xwayland); |
443 | #endif | 444 | #endif |
444 | wl_display_destroy_clients(server->wl_display); | 445 | wl_display_destroy_clients(server->wl_display); |
@@ -448,7 +449,7 @@ void server_fini(struct sway_server *server) { | |||
448 | } | 449 | } |
449 | 450 | ||
450 | bool server_start(struct sway_server *server) { | 451 | bool server_start(struct sway_server *server) { |
451 | #if HAVE_XWAYLAND | 452 | #if WLR_HAS_XWAYLAND |
452 | if (config->xwayland != XWAYLAND_MODE_DISABLED) { | 453 | if (config->xwayland != XWAYLAND_MODE_DISABLED) { |
453 | sway_log(SWAY_DEBUG, "Initializing Xwayland (lazy=%d)", | 454 | sway_log(SWAY_DEBUG, "Initializing Xwayland (lazy=%d)", |
454 | config->xwayland == XWAYLAND_MODE_LAZY); | 455 | config->xwayland == XWAYLAND_MODE_LAZY); |