diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-03 17:37:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-03 17:37:15 +0100 |
commit | baf4841d790a976bc6293b9b5d1e70621f236747 (patch) | |
tree | 5dfe97b2acfe005b74fc23fa4db8ab04b91aa747 /sway/ipc-json.c | |
parent | 6297b757b1316cc28b4e698a60faf1b0c9e071d8 (diff) | |
parent | 1f486fe89819c28c3b04f8da3456aa9e7888a2eb (diff) | |
download | sway-baf4841d790a976bc6293b9b5d1e70621f236747.tar.xz |
Merge pull request #3052 from colemickens/output-current-mode
Correct "Current mode" in `swaymsg -t get_outputs` for scaled outputs
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 9 |
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}; |