mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
sway/ipc-json: Handle automatic max_render_time
This commit is contained in:
parent
aa2a2b8ce1
commit
ccf1cc7c2d
1 changed files with 8 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue