mirror of
https://github.com/swaywm/sway.git
synced 2025-04-03 19:07:45 +03:00
swaynag: adds option to set wayland shell layer
Uses --layer/-y set to overlay|top|bottom|background
This commit is contained in:
parent
75a4122f7a
commit
d13090be54
6 changed files with 37 additions and 2 deletions
|
@ -26,6 +26,7 @@ struct swaynag_type *swaynag_type_new(const char *name) {
|
|||
type->button_gap_close = -1;
|
||||
type->button_margin_right = -1;
|
||||
type->button_padding = -1;
|
||||
type->layer = -1;
|
||||
return type;
|
||||
}
|
||||
|
||||
|
@ -35,6 +36,7 @@ void swaynag_types_add_default(list_t *types) {
|
|||
type_defaults->anchors = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP
|
||||
| ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT
|
||||
| ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
|
||||
type_defaults->layer = ZWLR_LAYER_SHELL_V1_LAYER_TOP;
|
||||
type_defaults->button_background = 0x333333FF;
|
||||
type_defaults->details_background = 0x333333FF;
|
||||
type_defaults->background = 0x323232FF;
|
||||
|
@ -100,6 +102,10 @@ void swaynag_type_merge(struct swaynag_type *dest, struct swaynag_type *src) {
|
|||
dest->anchors = src->anchors;
|
||||
}
|
||||
|
||||
if (src->layer >= 0) {
|
||||
dest->layer = src->layer;
|
||||
}
|
||||
|
||||
// Colors
|
||||
if (src->button_background > 0) {
|
||||
dest->button_background = src->button_background;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue