mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-11-19 06:59:53 -05:00
output: add list of layers
This commit is contained in:
parent
6891f76fe1
commit
b5603ca82a
2 changed files with 13 additions and 0 deletions
4
output.c
4
output.c
|
|
@ -320,6 +320,10 @@ handle_new_output(struct wl_listener *listener, void *data)
|
||||||
output_disable(next);
|
output_disable(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < sizeof(output->layers) / sizeof(output->layers[0]); i++) {
|
||||||
|
wl_list_init(&output->layers[i]);
|
||||||
|
}
|
||||||
|
|
||||||
if (!wlr_xcursor_manager_load(server->seat->xcursor_manager, wlr_output->scale)) {
|
if (!wlr_xcursor_manager_load(server->seat->xcursor_manager, wlr_output->scale)) {
|
||||||
wlr_log(WLR_ERROR, "Cannot load XCursor theme for output '%s' with scale %f", wlr_output->name,
|
wlr_log(WLR_ERROR, "Cannot load XCursor theme for output '%s' with scale %f", wlr_output->name,
|
||||||
wlr_output->scale);
|
wlr_output->scale);
|
||||||
|
|
|
||||||
9
output.h
9
output.h
|
|
@ -7,6 +7,14 @@
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
|
||||||
|
/* There exist currently four layers:
|
||||||
|
* - ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND
|
||||||
|
* - ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM
|
||||||
|
* - ZWLR_LAYER_SHELL_V1_LAYER_TOP
|
||||||
|
* - ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
|
||||||
|
*/
|
||||||
|
#define NUM_LAYERS 4
|
||||||
|
|
||||||
struct cg_output {
|
struct cg_output {
|
||||||
struct cg_server *server;
|
struct cg_server *server;
|
||||||
struct wlr_output *wlr_output;
|
struct wlr_output *wlr_output;
|
||||||
|
|
@ -18,6 +26,7 @@ struct cg_output {
|
||||||
struct wl_listener frame;
|
struct wl_listener frame;
|
||||||
|
|
||||||
struct wl_list link; // cg_server::outputs
|
struct wl_list link; // cg_server::outputs
|
||||||
|
struct wl_list layers[NUM_LAYERS]; // cg_layer_surface::link
|
||||||
};
|
};
|
||||||
|
|
||||||
void handle_output_manager_apply(struct wl_listener *listener, void *data);
|
void handle_output_manager_apply(struct wl_listener *listener, void *data);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue