From 3f600565e4dd4fb7a45a7b721d518c79f8d41b59 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Mon, 16 May 2022 13:53:36 +0200 Subject: [PATCH] server: request xdg-shell v2 Wlroots does not yet support the newer xdg-shell versions and now requires the compositor to set the supported xdg-shell version during creation. Set this to v2 for sway as well. Fixes https://github.com/swaywm/sway/issues/7001 --- sway/server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sway/server.c b/sway/server.c index 0f0c76a89..627d80d66 100644 --- a/sway/server.c +++ b/sway/server.c @@ -72,6 +72,8 @@ static void handle_drm_lease_request(struct wl_listener *listener, void *data) { } } +#define SWAY_XDG_SHELL_VERSION 2 + bool server_init(struct sway_server *server) { sway_log(SWAY_DEBUG, "Initializing Wayland server"); @@ -126,7 +128,8 @@ bool server_init(struct sway_server *server) { &server->layer_shell_surface); server->layer_shell_surface.notify = handle_layer_shell_surface; - server->xdg_shell = wlr_xdg_shell_create(server->wl_display); + server->xdg_shell = wlr_xdg_shell_create(server->wl_display, + SWAY_XDG_SHELL_VERSION); wl_signal_add(&server->xdg_shell->events.new_surface, &server->xdg_shell_surface); server->xdg_shell_surface.notify = handle_xdg_shell_surface;