Add partial support for layer-shell

We can now run swaybg and waybar
This commit is contained in:
Johan Malm 2020-09-30 17:18:20 +01:00
parent 00adc7ed34
commit a4c22f7c4d
7 changed files with 426 additions and 1 deletions

View file

@ -48,7 +48,11 @@ struct server {
struct wlr_backend *backend;
struct wlr_xdg_shell *xdg_shell;
struct wlr_layer_shell_v1 *layer_shell;
struct wl_listener new_xdg_surface;
struct wl_listener new_layer_surface;
struct wl_listener xdg_toplevel_decoration;
struct wlr_xwayland *xwayland;
struct wl_listener new_xwayland_surface;
@ -88,6 +92,7 @@ struct output {
struct wl_list link;
struct server *server;
struct wlr_output *wlr_output;
struct wl_list layers[4];
struct wl_listener frame;
struct wl_listener destroy;
};

23
include/layers.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef __LABWC_LAYERS_H
#define __LABWC_LAYERS_H
#include <wayland-server.h>
#include <wlr/types/wlr_layer_shell_v1.h>
struct server;
struct lab_layer_surface {
struct wlr_layer_surface_v1 *layer_surface;
struct server *server;
struct wl_list link;
struct wl_listener destroy;
struct wl_listener map;
struct wl_listener surface_commit;
struct wl_listener output_destroy;
struct wlr_box geo;
};
void layers_init(struct server *server);
#endif /* __LABWC_LAYERS_H */