tearing: add fullscreen options

Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
This commit is contained in:
Jens Peters 2024-06-29 07:19:24 +02:00
parent 4bda13d870
commit 6047269db4
No known key found for this signature in database
9 changed files with 105 additions and 20 deletions

View file

@ -15,8 +15,15 @@ set_tearing_hint(struct wl_listener *listener, void *data)
{
struct tearing_controller *controller = wl_container_of(listener, controller, set_hint);
struct view *view = view_from_wlr_surface(controller->tearing_control->surface);
if (view && controller->tearing_control->current) {
view->tearing_hint = true;
if (view) {
/*
* tearing_control->current is actually an enum:
* WP_TEARING_CONTROL_V1_PRESENTATION_HINT_VSYNC = 0
* WP_TEARING_CONTROL_V1_PRESENTATION_HINT_ASYNC = 1
*
* Using it as a bool here allows us to not ship the XML.
*/
view->tearing_hint = controller->tearing_control->current;
}
}