ipc-json,swaysavetree: round-trip placeholder swallows

ipc_json_describe_container emits the original swallows JSON for
unfilled placeholders. New sway-save-tree binary dumps a
workspace tiling tree as append_layout-compatible JSON,
synthesising swallows from app_id / class / instance.
This commit is contained in:
codegax 2026-05-01 17:50:00 -06:00
parent 40bb60a91d
commit cc4ba936e9
8 changed files with 319 additions and 0 deletions

View file

@ -9,6 +9,7 @@
struct sway_view;
struct sway_seat;
struct json_object;
enum sway_container_layout {
L_NONE,
@ -146,6 +147,7 @@ struct sway_container {
// i3-shaped array so IPC can echo it verbatim for round-trip.
bool is_placeholder;
list_t *swallows; // struct criteria *
struct json_object *swallows_json;
struct {
struct wl_signal destroy;