diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2019-02-23 07:49:40 -0800 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-02-25 17:10:04 -0500 |
commit | b2abc6041a426eed78f14ad0a37a2c11aa20fe26 (patch) | |
tree | 9712f3366f38d094291320a7b30d76b0e4f6576b /sway | |
parent | Update for swaywm/wlroots#1517 (diff) | |
download | sway-b2abc6041a426eed78f14ad0a37a2c11aa20fe26.tar.gz sway-b2abc6041a426eed78f14ad0a37a2c11aa20fe26.tar.zst sway-b2abc6041a426eed78f14ad0a37a2c11aa20fe26.zip |
ipc: add missing fields to disabled outputs
i3 requires all outputs to have certain fields, including 'primary', 'current_workspace', and 'rect' which were missing on disabled outputs.
https://i3wm.org/docs/ipc.html#_outputs_reply
Diffstat (limited to 'sway')
-rw-r--r-- | sway/ipc-json.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index a2ab2bba..125df387 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -251,6 +251,7 @@ json_object *ipc_json_describe_disabled_output(struct sway_output *output) { | |||
251 | json_object_object_add(object, "name", | 251 | json_object_object_add(object, "name", |
252 | json_object_new_string(wlr_output->name)); | 252 | json_object_new_string(wlr_output->name)); |
253 | json_object_object_add(object, "active", json_object_new_boolean(false)); | 253 | json_object_object_add(object, "active", json_object_new_boolean(false)); |
254 | json_object_object_add(object, "primary", json_object_new_boolean(false)); | ||
254 | json_object_object_add(object, "make", | 255 | json_object_object_add(object, "make", |
255 | json_object_new_string(wlr_output->make)); | 256 | json_object_new_string(wlr_output->make)); |
256 | json_object_object_add(object, "model", | 257 | json_object_object_add(object, "model", |
@@ -259,6 +260,15 @@ json_object *ipc_json_describe_disabled_output(struct sway_output *output) { | |||
259 | json_object_new_string(wlr_output->serial)); | 260 | json_object_new_string(wlr_output->serial)); |
260 | json_object_object_add(object, "modes", json_object_new_array()); | 261 | json_object_object_add(object, "modes", json_object_new_array()); |
261 | 262 | ||
263 | json_object_object_add(object, "current_workspace", NULL); | ||
264 | |||
265 | json_object *rect_object = json_object_new_object(); | ||
266 | json_object_object_add(rect_object, "x", json_object_new_int(0)); | ||
267 | json_object_object_add(rect_object, "y", json_object_new_int(0)); | ||
268 | json_object_object_add(rect_object, "width", json_object_new_int(0)); | ||
269 | json_object_object_add(rect_object, "height", json_object_new_int(0)); | ||
270 | json_object_object_add(object, "rect", rect_object); | ||
271 | |||
262 | json_object_object_add(object, "percent", NULL); | 272 | json_object_object_add(object, "percent", NULL); |
263 | 273 | ||
264 | return object; | 274 | return object; |