Use layer shell

This commit is contained in:
Dorota Czaplejewicz
2019-04-05 15:29:19 +00:00
parent 6ff33b48d1
commit b065b16bf1
11 changed files with 835 additions and 11 deletions

31
src/wayland.h Normal file
View File

@ -0,0 +1,31 @@
#ifndef WAYLAND_H
#define WAYLAND_H
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
#include <gmodule.h>
struct squeak_wayland {
struct zwlr_layer_shell_v1 *layer_shell;
GPtrArray *outputs; // *wl_output
struct wl_seat *seat;
};
extern struct squeak_wayland *squeak_wayland;
static inline void squeak_wayland_init(struct squeak_wayland *wayland) {
wayland->outputs = g_ptr_array_new();
}
static inline void squeak_wayland_set_global(struct squeak_wayland *wayland) {
squeak_wayland = wayland;
}
static inline void squeak_wayland_deinit(struct squeak_wayland *wayland) {
g_ptr_array_free(wayland->outputs, TRUE);
}
#endif // WAYLAND_H