aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/ipc-json.c2
-rw-r--r--swaymsg/main.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 87aef47b..be961812 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -224,6 +224,8 @@ static void ipc_json_describe_output(struct sway_output *output,
224 * ((double)output->height / parent_box.height); 224 * ((double)output->height / parent_box.height);
225 json_object_object_add(object, "percent", json_object_new_double(percent)); 225 json_object_object_add(object, "percent", json_object_new_double(percent));
226 } 226 }
227
228 json_object_object_add(object, "max_render_time", json_object_new_int(output->max_render_time));
227} 229}
228 230
229json_object *ipc_json_describe_disabled_output(struct sway_output *output) { 231json_object *ipc_json_describe_disabled_output(struct sway_output *output) {
diff --git a/swaymsg/main.c b/swaymsg/main.c
index a018a68e..596cf4ef 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -189,13 +189,14 @@ static void pretty_print_output(json_object *o) {
189 json_object_object_get_ex(o, "focused", &focused); 189 json_object_object_get_ex(o, "focused", &focused);
190 json_object_object_get_ex(o, "active", &active); 190 json_object_object_get_ex(o, "active", &active);
191 json_object_object_get_ex(o, "current_workspace", &ws); 191 json_object_object_get_ex(o, "current_workspace", &ws);
192 json_object *make, *model, *serial, *scale, *subpixel, *transform; 192 json_object *make, *model, *serial, *scale, *subpixel, *transform, *max_render_time;
193 json_object_object_get_ex(o, "make", &make); 193 json_object_object_get_ex(o, "make", &make);
194 json_object_object_get_ex(o, "model", &model); 194 json_object_object_get_ex(o, "model", &model);
195 json_object_object_get_ex(o, "serial", &serial); 195 json_object_object_get_ex(o, "serial", &serial);
196 json_object_object_get_ex(o, "scale", &scale); 196 json_object_object_get_ex(o, "scale", &scale);
197 json_object_object_get_ex(o, "subpixel_hinting", &subpixel); 197 json_object_object_get_ex(o, "subpixel_hinting", &subpixel);
198 json_object_object_get_ex(o, "transform", &transform); 198 json_object_object_get_ex(o, "transform", &transform);
199 json_object_object_get_ex(o, "max_render_time", &max_render_time);
199 json_object *x, *y; 200 json_object *x, *y;
200 json_object_object_get_ex(rect, "x", &x); 201 json_object_object_get_ex(rect, "x", &x);
201 json_object_object_get_ex(rect, "y", &y); 202 json_object_object_get_ex(rect, "y", &y);
@@ -215,7 +216,8 @@ static void pretty_print_output(json_object *o) {
215 " Scale factor: %f\n" 216 " Scale factor: %f\n"
216 " Subpixel hinting: %s\n" 217 " Subpixel hinting: %s\n"
217 " Transform: %s\n" 218 " Transform: %s\n"
218 " Workspace: %s\n", 219 " Workspace: %s\n"
220 " Max render time: ",
219 json_object_get_string(name), 221 json_object_get_string(name),
220 json_object_get_string(make), 222 json_object_get_string(make),
221 json_object_get_string(model), 223 json_object_get_string(model),
@@ -230,6 +232,8 @@ static void pretty_print_output(json_object *o) {
230 json_object_get_string(transform), 232 json_object_get_string(transform),
231 json_object_get_string(ws) 233 json_object_get_string(ws)
232 ); 234 );
235 int max_render_time_int = json_object_get_int(max_render_time);
236 printf(max_render_time_int == 0 ? "off\n" : "%d ms\n", max_render_time_int);
233 } else { 237 } else {
234 printf( 238 printf(
235 "Output %s '%s %s %s' (inactive)\n", 239 "Output %s '%s %s %s' (inactive)\n",