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.
This commit is contained in:
Ricardo Steijn 2024-08-05 02:13:49 +02:00 committed by GitHub
parent b881c2e84c
commit 9a1c411abd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 243 additions and 3 deletions

View file

@ -399,6 +399,8 @@ static void ipc_json_describe_enabled_output(struct sway_output *output,
}
json_object_object_add(object, "max_render_time", json_object_new_int(output->max_render_time));
json_object_object_add(object, "allow_tearing", json_object_new_boolean(output->allow_tearing));
}
json_object *ipc_json_describe_disabled_output(struct sway_output *output) {
@ -593,6 +595,8 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
json_object_object_add(object, "max_render_time", json_object_new_int(c->view->max_render_time));
json_object_object_add(object, "allow_tearing", json_object_new_boolean(view_can_tear(c->view)));
json_object_object_add(object, "shell", json_object_new_string(view_get_shell(c->view)));
json_object_object_add(object, "inhibit_idle",