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

@ -371,6 +371,13 @@ bool server_init(struct sway_server *server) {
server->content_type_manager_v1 =
wlr_content_type_manager_v1_create(server->wl_display, 1);
wlr_fractional_scale_manager_v1_create(server->wl_display, 1);
server->tearing_control_v1 =
wlr_tearing_control_manager_v1_create(server->wl_display, 1);
server->tearing_control_new_object.notify = handle_new_tearing_hint;
wl_signal_add(&server->tearing_control_v1->events.new_object,
&server->tearing_control_new_object);
wl_list_init(&server->tearing_controllers);
struct wlr_xdg_foreign_registry *foreign_registry =
wlr_xdg_foreign_registry_create(server->wl_display);