aboutsummaryrefslogtreecommitdiffstats
path: root/swaymsg
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2020-03-05 14:37:32 +0100
committerLibravatar Drew DeVault <sir@cmpwn.com>2020-03-07 00:32:04 +0100
commita2d49099e16ef54a409bb7b42061fd16052cbeb6 (patch)
treeb28df4933852610751b617c018085b33ae7fce89 /swaymsg
parentAdd an adaptive_sync output command (diff)
downloadsway-a2d49099e16ef54a409bb7b42061fd16052cbeb6.tar.gz
sway-a2d49099e16ef54a409bb7b42061fd16052cbeb6.tar.zst
sway-a2d49099e16ef54a409bb7b42061fd16052cbeb6.zip
Add adaptive_sync_status to output IPC reply
Diffstat (limited to 'swaymsg')
-rw-r--r--swaymsg/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c
index b9a8189c..f9d3515a 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -190,7 +190,7 @@ static void pretty_print_output(json_object *o) {
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, *scale_filter, *subpixel, 192 json_object *make, *model, *serial, *scale, *scale_filter, *subpixel,
193 *transform, *max_render_time; 193 *transform, *max_render_time, *adaptive_sync_status;
194 json_object_object_get_ex(o, "make", &make); 194 json_object_object_get_ex(o, "make", &make);
195 json_object_object_get_ex(o, "model", &model); 195 json_object_object_get_ex(o, "model", &model);
196 json_object_object_get_ex(o, "serial", &serial); 196 json_object_object_get_ex(o, "serial", &serial);
@@ -199,6 +199,7 @@ static void pretty_print_output(json_object *o) {
199 json_object_object_get_ex(o, "subpixel_hinting", &subpixel); 199 json_object_object_get_ex(o, "subpixel_hinting", &subpixel);
200 json_object_object_get_ex(o, "transform", &transform); 200 json_object_object_get_ex(o, "transform", &transform);
201 json_object_object_get_ex(o, "max_render_time", &max_render_time); 201 json_object_object_get_ex(o, "max_render_time", &max_render_time);
202 json_object_object_get_ex(o, "adaptive_sync_status", &adaptive_sync_status);
202 json_object *x, *y; 203 json_object *x, *y;
203 json_object_object_get_ex(rect, "x", &x); 204 json_object_object_get_ex(rect, "x", &x);
204 json_object_object_get_ex(rect, "y", &y); 205 json_object_object_get_ex(rect, "y", &y);
@@ -219,8 +220,7 @@ static void pretty_print_output(json_object *o) {
219 " Scale filter: %s\n" 220 " Scale filter: %s\n"
220 " Subpixel hinting: %s\n" 221 " Subpixel hinting: %s\n"
221 " Transform: %s\n" 222 " Transform: %s\n"
222 " Workspace: %s\n" 223 " Workspace: %s\n",
223 " Max render time: ",
224 json_object_get_string(name), 224 json_object_get_string(name),
225 json_object_get_string(make), 225 json_object_get_string(make),
226 json_object_get_string(model), 226 json_object_get_string(model),
@@ -236,8 +236,13 @@ static void pretty_print_output(json_object *o) {
236 json_object_get_string(transform), 236 json_object_get_string(transform),
237 json_object_get_string(ws) 237 json_object_get_string(ws)
238 ); 238 );
239
239 int max_render_time_int = json_object_get_int(max_render_time); 240 int max_render_time_int = json_object_get_int(max_render_time);
241 printf(" Max render time: ");
240 printf(max_render_time_int == 0 ? "off\n" : "%d ms\n", max_render_time_int); 242 printf(max_render_time_int == 0 ? "off\n" : "%d ms\n", max_render_time_int);
243
244 printf(" Adaptive sync: %s\n",
245 json_object_get_string(adaptive_sync_status));
241 } else { 246 } else {
242 printf( 247 printf(
243 "Output %s '%s %s %s' (inactive)\n", 248 "Output %s '%s %s %s' (inactive)\n",