diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-21 18:34:11 +0100 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-03-10 11:16:01 +0000 |
commit | 1b6fac4aa6d1038f64f771e6ffbe01b90bb967e5 (patch) | |
tree | bfd9836735e2a11f477ddfbfe073fda3e6166ed1 /backend | |
parent | 87969c1c7c6a85420456b2d6c075944c4b029840 (diff) |
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
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/output.c | 25 |
1 files changed, 0 insertions, 25 deletions
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; } |