mirror of
https://github.com/NickHu/sway
synced 2024-12-26 21:58:30 +01:00
sway/server: specify wlr-layer-shell version on creation
This commit is contained in:
parent
85005b52fe
commit
e1be46875d
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue