aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-11-14 09:59:58 -0500
committerSimon Ser <contact@emersion.fr>2022-11-14 16:10:55 +0100
commite1be46875daba9a5d79f2fc7a92ead8a2285882d (patch)
treef7d85fe885b5b48c14828c0718652bf872907eaa
parent85005b52fe5b832e4ea914fa28048b0c5c803769 (diff)
sway/server: specify wlr-layer-shell version on creation
-rw-r--r--sway/server.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/server.c b/sway/server.c
index f6720755..fd9504cc 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -49,6 +49,9 @@
#include "sway/xwayland.h"
#endif
+#define SWAY_XDG_SHELL_VERSION 2
+#define SWAY_LAYER_SHELL_VERSION 3
+
static void handle_drm_lease_request(struct wl_listener *listener, void *data) {
/* We only offer non-desktop outputs, but in the future we might want to do
* more logic here. */
@@ -61,8 +64,6 @@ 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");
server->wl_display = wl_display_create();
@@ -121,7 +122,8 @@ bool server_init(struct sway_server *server) {
server->idle_inhibit_manager_v1 =
sway_idle_inhibit_manager_v1_create(server->wl_display, server->idle);
- server->layer_shell = wlr_layer_shell_v1_create(server->wl_display);
+ server->layer_shell = wlr_layer_shell_v1_create(server->wl_display,
+ SWAY_LAYER_SHELL_VERSION);
wl_signal_add(&server->layer_shell->events.new_surface,
&server->layer_shell_surface);
server->layer_shell_surface.notify = handle_layer_shell_surface;