Added "effects" array to swayipc output
This commit is contained in:
parent
762f049389
commit
cc6d4bad93
2 changed files with 25 additions and 3 deletions
|
@ -373,6 +373,21 @@ static void ipc_json_describe_enabled_output(struct sway_output *output,
|
||||||
json_object_new_int(lsurface->extent.y));
|
json_object_new_int(lsurface->extent.y));
|
||||||
json_object_object_add(layer, "extent", extent);
|
json_object_object_add(layer, "extent", extent);
|
||||||
|
|
||||||
|
json_object *effects = json_object_new_array();
|
||||||
|
struct layer_effects *layer_effects = lsurface->effects;
|
||||||
|
if (layer_effects) {
|
||||||
|
if (layer_effects->blur) {
|
||||||
|
json_object_array_add(effects, json_object_new_string("blur"));
|
||||||
|
}
|
||||||
|
if (layer_effects->shadow) {
|
||||||
|
json_object_array_add(effects, json_object_new_string("shadow"));
|
||||||
|
}
|
||||||
|
if (layer_effects->corner_rounding) {
|
||||||
|
json_object_array_add(effects, json_object_new_string("corner_rounding"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
json_object_object_add(layer, "effects", effects);
|
||||||
|
|
||||||
json_object_array_add(layers, layer);
|
json_object_array_add(layers, layer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,7 +233,7 @@ following properties:
|
||||||
|- layer_shell_surfaces
|
|- layer_shell_surfaces
|
||||||
: array
|
: array
|
||||||
: An array of all layer-shell surfaces attached to the output. Each object
|
: An array of all layer-shell surfaces attached to the output. Each object
|
||||||
contains _namespace_, _layer_, and _extent_ object that contains _x_, _y_
|
contains _namespace_, _layer_, _effects_, and _extent_ object that contains _x_, _y_
|
||||||
_width_, and _height_
|
_width_, and _height_
|
||||||
|- current_workspace
|
|- current_workspace
|
||||||
: string
|
: string
|
||||||
|
@ -273,7 +273,9 @@ following properties:
|
||||||
"height": 1440,
|
"height": 1440,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 0
|
"y": 0
|
||||||
}
|
},
|
||||||
|
"effects": [
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"namespace": "waybar",
|
"namespace": "waybar",
|
||||||
|
@ -283,7 +285,12 @@ following properties:
|
||||||
"height": 31,
|
"height": 31,
|
||||||
"x": 6,
|
"x": 6,
|
||||||
"y": 6
|
"y": 6
|
||||||
}
|
},
|
||||||
|
"effects": [
|
||||||
|
"blur",
|
||||||
|
"shadow",
|
||||||
|
"corner_rounding"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"current_workspace": "1",
|
"current_workspace": "1",
|
||||||
|
|
Loading…
Add table
Reference in a new issue