Add layer option

Only applies to Wayland and the default is still bottom.
This commit is contained in:
Nulo 2021-08-25 13:20:33 -03:00 committed by Daniel Eklöf
parent 7e7c011126
commit eb94c8cceb
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
8 changed files with 35 additions and 1 deletions

View file

@ -988,10 +988,14 @@ setup(struct bar *_bar)
wl_surface_add_listener(backend->surface, &surface_listener, backend);
enum zwlr_layer_shell_v1_layer layer = bar->layer == BAR_LAYER_BOTTOM
? ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM
: ZWLR_LAYER_SHELL_V1_LAYER_TOP;
backend->layer_surface = zwlr_layer_shell_v1_get_layer_surface(
backend->layer_shell, backend->surface,
backend->monitor != NULL ? backend->monitor->output : NULL,
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM, "panel");
layer, "panel");
if (backend->layer_surface == NULL) {
LOG_ERR("failed to create layer shell surface");