Add initial layer shell skeleton

This commit is contained in:
Jente Hidskes 2020-02-23 22:20:25 +01:00 committed by Sungjoon Moon
parent a617d62354
commit 0e946d5a4f
5 changed files with 52 additions and 1 deletions

13
cage.c
View file

@ -1,7 +1,7 @@
/*
* Cage: A Wayland kiosk.
*
* Copyright (C) 2018-2020 Jente Hidskes
* Copyright (C) 2018-2021 Jente Hidskes
*
* See the LICENSE file accompanying this file.
*/
@ -27,6 +27,7 @@
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>
#include <wlr/types/wlr_idle_notify_v1.h>
#include <wlr/types/wlr_layer_shell_v1.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output_management_v1.h>
#include <wlr/types/wlr_presentation_time.h>
@ -52,6 +53,7 @@
#endif
#include "idle_inhibit_v1.h"
#include "layer_shell_v1.h"
#include "output.h"
#include "seat.h"
#include "server.h"
@ -461,6 +463,15 @@ main(int argc, char *argv[])
goto end;
}
server.layer_shell_v1 = wlr_layer_shell_v1_create(server.wl_display, 4);
if (!server.layer_shell_v1) {
wlr_log(WLR_ERROR, "Unable to create the layer shell");
ret = 1;
goto end;
}
server.new_layer_shell_v1_surface.notify = handle_layer_shell_v1_surface_new;
wl_signal_add(&server.layer_shell_v1->events.new_surface, &server.new_layer_shell_v1_surface);
if (!wlr_export_dmabuf_manager_v1_create(server.wl_display)) {
wlr_log(WLR_ERROR, "Unable to create the export DMABUF manager");
ret = 1;