aboutsummaryrefslogtreecommitdiff
path: root/swaymsg/main.c
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-08-05 02:13:49 +0200
committerFurkan Sahin <furkan-dev@proton.me>2024-08-05 02:13:49 +0200
commit37d3937789deb322d2d4de7a13ace3202520026a (patch)
treeb38f31ec17b8f8408652b9ae104b6c47bce50714 /swaymsg/main.c
parent9636bda457fc41a3ff743e48d6cfe4d4b776d421 (diff)
Add support for tearing-control-v1
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3871 Adds option to allow tearing per output, as well as an option to force enable or disable tearing for a specific application using a window rule. Only works with fullscreen applications.
Diffstat (limited to 'swaymsg/main.c')
-rw-r--r--swaymsg/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c
index 573a7b16..5c57171e 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -193,7 +193,7 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "current_workspace", &ws);
json_object_object_get_ex(o, "non_desktop", &non_desktop);
json_object *make, *model, *serial, *scale, *scale_filter, *subpixel,
- *transform, *max_render_time, *adaptive_sync_status;
+ *transform, *max_render_time, *adaptive_sync_status, *allow_tearing;
json_object_object_get_ex(o, "make", &make);
json_object_object_get_ex(o, "model", &model);
json_object_object_get_ex(o, "serial", &serial);
@@ -203,6 +203,7 @@ static void pretty_print_output(json_object *o) {
json_object_object_get_ex(o, "transform", &transform);
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, "allow_tearing", &allow_tearing);
json_object *x, *y;
json_object_object_get_ex(rect, "x", &x);
json_object_object_get_ex(rect, "y", &y);
@@ -256,6 +257,9 @@ static void pretty_print_output(json_object *o) {
printf(" Adaptive sync: %s\n",
json_object_get_string(adaptive_sync_status));
+
+ printf(" Allow tearing: %s\n",
+ json_object_get_boolean(allow_tearing) ? "yes" : "no");
} else {
printf(
"Output %s '%s %s %s' (disabled)\n",