tearing: add fullscreen option

If set, labwc will try to automatically enable tearing for fullscreen
applications.

Fixes: #1557
This commit is contained in:
Consolatis 2024-02-28 03:29:07 +01:00
parent 7110b7cf3e
commit db7f300554
5 changed files with 33 additions and 5 deletions

View file

@ -44,6 +44,12 @@ get_tearing_preference(struct output *output)
return false;
}
/* If configured, automatically enable tearing for fullscreen applications */
if (rc.allow_tearing == LAB_TEARING_FULLSCREEN
&& server->active_view->fullscreen) {
return true;
}
/* If the active view requests tearing, or it is toggled on with action, allow it */
return server->active_view->tearing_hint;
}