sway/ipc-json: Handle automatic max_render_time

This commit is contained in:
Andri Yngvason 2022-09-24 15:20:56 +00:00
parent aa2a2b8ce1
commit ccf1cc7c2d

View file

@ -342,7 +342,14 @@ static void ipc_json_describe_enabled_output(struct sway_output *output,
json_object_object_add(object, "percent", json_object_new_double(percent));
}
json_object_object_add(object, "max_render_time", json_object_new_int(output->max_render_time));
int max_render_time;
if (output->max_render_time == -1) {
max_render_time = -output->auto_max_render_time;
} else {
max_render_time = output->max_render_time;
}
json_object_object_add(object, "max_render_time",
json_object_new_int(max_render_time));
}
json_object *ipc_json_describe_disabled_output(struct sway_output *output) {