1
1
mirror of https://github.com/swaywm/sway synced 2024-11-23 17:32:40 +01:00

Provide current DPMS state in GET_OUTPUTS

This commit is contained in:
Josef Gajdusek 2019-05-28 21:33:15 +02:00 committed by Brian Ashworth
parent 18476b0ec1
commit 2c6a10c4ba
2 changed files with 6 additions and 0 deletions

@ -162,6 +162,8 @@ static void ipc_json_describe_output(struct sway_output *output,
struct wlr_output *wlr_output = output->wlr_output;
json_object_object_add(object, "type", json_object_new_string("output"));
json_object_object_add(object, "active", json_object_new_boolean(true));
json_object_object_add(object, "dpms",
json_object_new_boolean(output->wlr_output->enabled));
json_object_object_add(object, "primary", json_object_new_boolean(false));
json_object_object_add(object, "layout", json_object_new_string("output"));
json_object_object_add(object, "orientation",
@ -233,6 +235,7 @@ json_object *ipc_json_describe_disabled_output(struct sway_output *output) {
json_object_object_add(object, "name",
json_object_new_string(wlr_output->name));
json_object_object_add(object, "active", json_object_new_boolean(false));
json_object_object_add(object, "dpms", json_object_new_boolean(false));
json_object_object_add(object, "primary", json_object_new_boolean(false));
json_object_object_add(object, "make",
json_object_new_string(wlr_output->make));

@ -205,6 +205,9 @@ following properties:
|- active
: boolean
: Whether this output is active/enabled
|- dpms
: boolean
: Whether this output is on/off (via DPMS)
|- primary
: boolean
: For i3 compatibility, this will be false. It does not make sense in Wayland