backend/multi: only consider backends with dmabuf cap for timeline

timeline feature will never be applicable to backends without it, so
don't check it. Before this commit, it would cause timeline to be set
to false if libinput ended up being the last item in the list (which is
the case currently).
This commit is contained in:
llyyr 2024-10-29 09:56:42 +05:30 committed by Simon Ser
parent ebab992b44
commit d835fa813f

View File

@ -232,9 +232,12 @@ static void multi_backend_refresh_features(struct wlr_multi_backend *multi) {
struct subbackend_state *sub = NULL; struct subbackend_state *sub = NULL;
wl_list_for_each(sub, &multi->backends, link) { wl_list_for_each(sub, &multi->backends, link) {
// timeline is only applicable to backends that support DMABUFs
if (backend_get_buffer_caps(sub->backend) & WLR_BUFFER_CAP_DMABUF) {
multi->backend.features.timeline = multi->backend.features.timeline && multi->backend.features.timeline = multi->backend.features.timeline &&
sub->backend->features.timeline; sub->backend->features.timeline;
} }
}
} }
bool wlr_multi_backend_add(struct wlr_backend *_multi, bool wlr_multi_backend_add(struct wlr_backend *_multi,