aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-11-02 01:34:16 -0700
committerFurkan Sahin <furkan-dev@proton.me>2018-11-02 01:34:16 -0700
commitbc5249acb725c2d7ef035d43e83cd01445410ff9 (patch)
tree945af0a83fe8a4768cbcb03c89a6f42ff83ceeea
parent7750c479516c67b65ccb6c758d95e44912dc4f6a (diff)
sway-ipc: includes current_mode for each output
-rw-r--r--sway/ipc-json.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 20ab57b4..7cc965c8 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -136,13 +136,18 @@ static void ipc_json_describe_output(struct sway_output *output,
json_object_new_int(mode->width));
json_object_object_add(mode_object, "height",
json_object_new_int(mode->height));
- json_object_object_add(mode_object, "refresh",
- json_object_new_int(mode->refresh));
json_object_array_add(modes_array, mode_object);
}
json_object_object_add(object, "modes", modes_array);
+ json_object *current_mode_object = json_object_new_object();
+ json_object_object_add(current_mode_object, "width",
+ json_object_new_int(wlr_output->width));
+ json_object_object_add(current_mode_object, "height",
+ json_object_new_int(wlr_output->height));
+ json_object_object_add(object, "current_mode", current_mode_object);
+
struct sway_node *parent = node_get_parent(&output->node);
struct wlr_box parent_box = {0, 0, 0, 0};