rename Layer to LayerSurface; layer should refer to overlay, top, bottom or background LayerSurface variables are always called layersurface wlr_layer_surface_v1 variables are always called wlr_layer_surface
DADSQJFKYX6U5JOHSHJWWDSUFC7ZWSZVHFMEKPZEXKPELMEQBL2QC VCNLR5X75OAXVKPZQHF5RUZ7BONBUC6RPGO2NZEUD3FZ7TEVL66AC 7B74AT3BXYB7PVW4F6SGQNPMHOU5TEV5TZ54CG6VSQI46XSEKWXQC 3EKVUJXI7KI4ZCILWWFJ6UNBYAHBS42TZ3PIPXOEXQ24KEFFA72QC 7L3TU7JVWPBPHN7WF4TJ263BZ6BC3AYRRW6PULFUP5JZUGWWNUSAC EUJMBPB6W6ADQS4ZFMODC4S5WWH6SZIVM5OW46Z6CPMPDOL4HM7QC D425ND7AT3F7QJ3CCSESMVDOC3J5C5P32M5SJDBHECZJXLHNQ2FAC wl_list_for_each(layer, list, link) {struct wlr_layer_surface_v1 *layer_surface = layer->layer_surface;struct wlr_layer_surface_v1_state *state = &layer_surface->current;
wl_list_for_each(layersurface, list, link) {struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;struct wlr_layer_surface_v1_state *state = &wlr_layer_surface->current;
Layer *layer = wl_container_of(listener, layer, surface_commit);struct wlr_layer_surface_v1 *layer_surface = layer->layer_surface;struct wlr_output *wlr_output = layer_surface->output;
LayerSurface *layersurface = wl_container_of(listener, layersurface, surface_commit);struct wlr_layer_surface_v1 *wlr_layer_surface = layersurface->layer_surface;struct wlr_output *wlr_output = wlr_layer_surface->output;
if (layer->layer != layer_surface->current.layer) {wl_list_remove(&layer->link);wl_list_insert(&m->layers[layer_surface->current.layer],&layer->link);layer->layer = layer_surface->current.layer;
if (layersurface->layer != wlr_layer_surface->current.layer) {wl_list_remove(&layersurface->link);wl_list_insert(&m->layers[wlr_layer_surface->current.layer],&layersurface->link);layersurface->layer = wlr_layer_surface->current.layer;
layer->surface_commit.notify = commitlayernotify;wl_signal_add(&layer_surface->surface->events.commit,&layer->surface_commit);
layersurface->surface_commit.notify = commitlayernotify;wl_signal_add(&wlr_layer_surface->surface->events.commit,&layersurface->surface_commit);
layer->destroy.notify = destroylayernotify;wl_signal_add(&layer_surface->events.destroy, &layer->destroy);layer->map.notify = maplayernotify;wl_signal_add(&layer_surface->events.map, &layer->map);layer->unmap.notify = unmaplayernotify;wl_signal_add(&layer_surface->events.unmap, &layer->unmap);
layersurface->destroy.notify = destroylayernotify;wl_signal_add(&wlr_layer_surface->events.destroy, &layersurface->destroy);layersurface->map.notify = maplayernotify;wl_signal_add(&wlr_layer_surface->events.map, &layersurface->map);layersurface->unmap.notify = unmaplayernotify;wl_signal_add(&wlr_layer_surface->events.unmap, &layersurface->unmap);
if (layer->layer_surface->mapped)unmaplayer(layer);wl_list_remove(&layer->link);wl_list_remove(&layer->destroy.link);wl_list_remove(&layer->map.link);wl_list_remove(&layer->unmap.link);wl_list_remove(&layer->surface_commit.link);if (layer->layer_surface->output) {m = layer->layer_surface->output->data;
if (layersurface->layer_surface->mapped)unmaplayer(layersurface);wl_list_remove(&layersurface->link);wl_list_remove(&layersurface->destroy.link);wl_list_remove(&layersurface->map.link);wl_list_remove(&layersurface->unmap.link);wl_list_remove(&layersurface->surface_commit.link);if (layersurface->layer_surface->output) {m = layersurface->layer_surface->output->data;
Layer *layer = wl_container_of(listener, layer, map);wlr_surface_send_enter(layer->layer_surface->surface, layer->layer_surface->output);
LayerSurface *layersurface = wl_container_of(listener, layersurface, map);wlr_surface_send_enter(layersurface->layer_surface->surface, layersurface->layer_surface->output);