mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
config: layer: add 'overlay' and 'background'
The layer option (Wayland only) now accepts 'overlay' and 'background'. Closes #372
This commit is contained in:
parent
28a18ad91e
commit
d841aeeecd
6 changed files with 34 additions and 7 deletions
|
@ -18,7 +18,7 @@ struct bar {
|
|||
};
|
||||
|
||||
enum bar_location { BAR_TOP, BAR_BOTTOM };
|
||||
enum bar_layer { BAR_LAYER_TOP, BAR_LAYER_BOTTOM };
|
||||
enum bar_layer { BAR_LAYER_OVERLAY, BAR_LAYER_TOP, BAR_LAYER_BOTTOM, BAR_LAYER_BACKGROUND };
|
||||
enum bar_backend { BAR_BACKEND_AUTO, BAR_BACKEND_XCB, BAR_BACKEND_WAYLAND };
|
||||
|
||||
struct bar_config {
|
||||
|
|
|
@ -814,9 +814,26 @@ create_surface(struct wayland_backend *backend)
|
|||
|
||||
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;
|
||||
|
||||
enum zwlr_layer_shell_v1_layer layer;
|
||||
|
||||
switch (bar->layer) {
|
||||
case BAR_LAYER_BACKGROUND:
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND;
|
||||
break;
|
||||
|
||||
case BAR_LAYER_BOTTOM:
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM;
|
||||
break;
|
||||
|
||||
case BAR_LAYER_TOP:
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_TOP;
|
||||
break;
|
||||
|
||||
case BAR_LAYER_OVERLAY:
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY;
|
||||
break;
|
||||
}
|
||||
|
||||
backend->layer_surface = zwlr_layer_shell_v1_get_layer_surface(
|
||||
backend->layer_shell, backend->surface,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue