mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
Release layer tree when releasing output
This commit is contained in:
parent
f37a3ffa86
commit
fc3bc48e03
1 changed files with 14 additions and 1 deletions
15
src/output.c
15
src/output.c
|
|
@ -43,6 +43,19 @@ output_destroy_notify(struct wl_listener *listener, void *data)
|
||||||
wl_list_remove(&output->frame.link);
|
wl_list_remove(&output->frame.link);
|
||||||
wl_list_remove(&output->destroy.link);
|
wl_list_remove(&output->destroy.link);
|
||||||
|
|
||||||
|
struct lab_layer_surface *layer, *tmp_layer;
|
||||||
|
int nr_layers = sizeof(output->layers) / sizeof(output->layers[0]);
|
||||||
|
for (int i = 0;i < nr_layers;i++) {
|
||||||
|
wl_list_for_each_safe (layer, tmp_layer, &output->layers[i], link) {
|
||||||
|
wlr_layer_surface_v1_destroy(layer->scene_layer_surface->layer_surface);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < nr_layers; i++) {
|
||||||
|
wlr_scene_node_destroy(&output->layer_tree[i]->node);
|
||||||
|
}
|
||||||
|
wlr_scene_node_destroy(&output->layer_popup_tree->node);
|
||||||
|
|
||||||
struct view *view;
|
struct view *view;
|
||||||
struct server *server = output->server;
|
struct server *server = output->server;
|
||||||
wl_list_for_each(view, &server->views, link) {
|
wl_list_for_each(view, &server->views, link) {
|
||||||
|
|
@ -230,7 +243,7 @@ output_update_for_layout_change(struct server *server)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "Move" each wlr_output_cursor (in per-output coordinates) to
|
* "Move" each wlr_output_cursor (in per-output coordinates) to
|
||||||
* align with the seat cursor. Set a default cursor image so
|
* align with the seat cursor. Set a default cursor image so
|
||||||
* that the cursor isn't invisible on new outputs.
|
* that the cursor isn't invisible on new outputs.
|
||||||
*
|
*
|
||||||
* TODO: remember the most recent cursor image (see cursor.c)
|
* TODO: remember the most recent cursor image (see cursor.c)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue