From 1b6fac4aa6d1038f64f771e6ffbe01b90bb967e5 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 21 Feb 2023 18:34:11 +0100 Subject: output-layer: require all layers in wlr_output_state.layers - Simplifies the backends - Avoids having two ways to do the same thing: previously one could disable a layer by either omitting it from wlr_output_state.layers, or by passing a NULL buffer - We can change our mind in the future: we can allow users to omit some layers and define a meaning without breaking the API. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4017#note_1783997 --- backend/wayland/output.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'backend') diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 7d2fdb34..3f16388d 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -399,31 +399,6 @@ static bool commit_layers(struct wlr_wl_output *output, } } - // Unmap any layer we haven't seen - struct wlr_output_layer *wlr_layer; - wl_list_for_each(wlr_layer, &output->wlr_output.layers, link) { - bool found = false; - for (size_t i = 0; i < layers_len; i++) { - if (layers[i].layer == wlr_layer) { - found = true; - break; - } - } - if (found) { - continue; - } - - struct wlr_wl_output_layer *layer = - get_or_create_output_layer(output, wlr_layer); - if (layer == NULL) { - continue; - } - - // TODO: only do this once - wl_surface_attach(layer->surface, NULL, 0, 0); - wl_surface_commit(layer->surface); - } - return true; } -- cgit v1.2.3