mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
ipc: add scratchpad_state
property to GET_TREE
See previous commit. This restores ipc parity with i3.
This commit is contained in:
parent
2867ef646b
commit
0b84d82b9a
|
@ -289,6 +289,7 @@ static json_object *ipc_json_create_node(int id, const char* type, char *name,
|
||||||
json_object_object_add(object, "fullscreen_mode", json_object_new_int(0));
|
json_object_object_add(object, "fullscreen_mode", json_object_new_int(0));
|
||||||
json_object_object_add(object, "sticky", json_object_new_boolean(false));
|
json_object_object_add(object, "sticky", json_object_new_boolean(false));
|
||||||
json_object_object_add(object, "floating", NULL);
|
json_object_object_add(object, "floating", NULL);
|
||||||
|
json_object_object_add(object, "scratchpad_state", NULL);
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
@ -702,6 +703,10 @@ static void ipc_json_describe_container(struct sway_container *c, json_object *o
|
||||||
json_object_object_add(object, "fullscreen_mode",
|
json_object_object_add(object, "fullscreen_mode",
|
||||||
json_object_new_int(c->pending.fullscreen_mode));
|
json_object_new_int(c->pending.fullscreen_mode));
|
||||||
|
|
||||||
|
// sway doesn't track if window was resized in scratchpad, so we can't use "changed"
|
||||||
|
json_object_object_add(object, "scratchpad_state",
|
||||||
|
json_object_new_string(!c->scratchpad ? "none" : "fresh"));
|
||||||
|
|
||||||
struct sway_node *parent = node_get_parent(&c->node);
|
struct sway_node *parent = node_get_parent(&c->node);
|
||||||
struct wlr_box parent_box = {0, 0, 0, 0};
|
struct wlr_box parent_box = {0, 0, 0, 0};
|
||||||
|
|
||||||
|
|
|
@ -379,6 +379,9 @@ node and will have the following properties:
|
||||||
|- floating
|
|- floating
|
||||||
: string
|
: string
|
||||||
: Floating state of container. Can be either "auto_off" or "user_on"
|
: Floating state of container. Can be either "auto_off" or "user_on"
|
||||||
|
|- scratchpad_state
|
||||||
|
: string
|
||||||
|
: Whether the window is in the scratchpad. Can be either "none" or "fresh"
|
||||||
|- app_id
|
|- app_id
|
||||||
: string
|
: string
|
||||||
: (Only views) For an xdg-shell view, the name of the application, if set.
|
: (Only views) For an xdg-shell view, the name of the application, if set.
|
||||||
|
|
Loading…
Reference in a new issue