swaymsg: print allow_drm_leasing config

This commit is contained in:
Simon Zeni 2025-06-13 17:06:37 -04:00
parent 7d0290bae7
commit 3f3323c47d

View file

@ -189,7 +189,7 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "current_workspace", &ws); json_object_object_get_ex(o, "current_workspace", &ws);
json_object_object_get_ex(o, "non_desktop", &non_desktop); json_object_object_get_ex(o, "non_desktop", &non_desktop);
json_object *make, *model, *serial, *scale, *scale_filter, *subpixel, json_object *make, *model, *serial, *scale, *scale_filter, *subpixel,
*transform, *max_render_time, *adaptive_sync_status, *allow_tearing, *transform, *max_render_time, *adaptive_sync_status, *allow_tearing, *allow_drm_leasing,
*hdr; *hdr;
json_object_object_get_ex(o, "make", &make); json_object_object_get_ex(o, "make", &make);
json_object_object_get_ex(o, "model", &model); json_object_object_get_ex(o, "model", &model);
@ -201,6 +201,7 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "max_render_time", &max_render_time); json_object_object_get_ex(o, "max_render_time", &max_render_time);
json_object_object_get_ex(o, "adaptive_sync_status", &adaptive_sync_status); json_object_object_get_ex(o, "adaptive_sync_status", &adaptive_sync_status);
json_object_object_get_ex(o, "allow_tearing", &allow_tearing); json_object_object_get_ex(o, "allow_tearing", &allow_tearing);
json_object_object_get_ex(o, "allow_drm_leasing", &allow_drm_leasing);
json_object_object_get_ex(o, "hdr", &hdr); json_object_object_get_ex(o, "hdr", &hdr);
json_object *x, *y; json_object *x, *y;
json_object_object_get_ex(rect, "x", &x); json_object_object_get_ex(rect, "x", &x);
@ -265,6 +266,9 @@ static void pretty_print_output(json_object *o) {
printf(" Allow tearing: %s\n", printf(" Allow tearing: %s\n",
json_object_get_boolean(allow_tearing) ? "yes" : "no"); json_object_get_boolean(allow_tearing) ? "yes" : "no");
printf(" Allow DRM leasing: %s\n",
json_object_get_boolean(allow_drm_leasing) ? "yes" : "no");
const char *hdr_str = "unsupported"; const char *hdr_str = "unsupported";
if (json_object_get_boolean(features_hdr)) { if (json_object_get_boolean(features_hdr)) {
hdr_str = json_object_get_boolean(hdr) ? "on" : "off"; hdr_str = json_object_get_boolean(hdr) ? "on" : "off";