aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 20:04:24 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 20:04:24 +1000
commita2fbb20a616444213ff3967b33eed7f4561e3978 (patch)
tree276a133eb78d6e0655bc164693650454d43a22ca /sway/desktop/layer_shell.c
parentAdd comment about usage to arrange_windows declaration (diff)
parentMerge pull request #2172 from apreiml/fix-keybinding-modifier-handling (diff)
downloadsway-a2fbb20a616444213ff3967b33eed7f4561e3978.tar.gz
sway-a2fbb20a616444213ff3967b33eed7f4561e3978.tar.zst
sway-a2fbb20a616444213ff3967b33eed7f4561e3978.zip
Merge remote-tracking branch 'upstream/master' into atomic
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index fe5fc316..ff37bbf1 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -219,6 +219,8 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) {
219 struct sway_layer_surface *sway_layer = 219 struct sway_layer_surface *sway_layer =
220 wl_container_of(listener, sway_layer, output_destroy); 220 wl_container_of(listener, sway_layer, output_destroy);
221 wl_list_remove(&sway_layer->output_destroy.link); 221 wl_list_remove(&sway_layer->output_destroy.link);
222 wl_list_remove(&sway_layer->link);
223 wl_list_init(&sway_layer->link);
222 sway_layer->layer_surface->output = NULL; 224 sway_layer->layer_surface->output = NULL;
223 wlr_layer_surface_close(sway_layer->layer_surface); 225 wlr_layer_surface_close(sway_layer->layer_surface);
224} 226}
@@ -350,10 +352,6 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
350 wl_signal_add(&layer_surface->surface->events.commit, 352 wl_signal_add(&layer_surface->surface->events.commit,
351 &sway_layer->surface_commit); 353 &sway_layer->surface_commit);
352 354
353 sway_layer->output_destroy.notify = handle_output_destroy;
354 wl_signal_add(&layer_surface->output->events.destroy,
355 &sway_layer->output_destroy);
356
357 sway_layer->destroy.notify = handle_destroy; 355 sway_layer->destroy.notify = handle_destroy;
358 wl_signal_add(&layer_surface->events.destroy, &sway_layer->destroy); 356 wl_signal_add(&layer_surface->events.destroy, &sway_layer->destroy);
359 sway_layer->map.notify = handle_map; 357 sway_layer->map.notify = handle_map;
@@ -366,6 +364,9 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
366 layer_surface->data = sway_layer; 364 layer_surface->data = sway_layer;
367 365
368 struct sway_output *output = layer_surface->output->data; 366 struct sway_output *output = layer_surface->output->data;
367 sway_layer->output_destroy.notify = handle_output_destroy;
368 wl_signal_add(&output->events.destroy, &sway_layer->output_destroy);
369
369 wl_list_insert(&output->layers[layer_surface->layer], &sway_layer->link); 370 wl_list_insert(&output->layers[layer_surface->layer], &sway_layer->link);
370 371
371 // Temporarily set the layer's current state to client_pending 372 // Temporarily set the layer's current state to client_pending