diff options
author | 2018-06-27 13:21:00 +1000 | |
---|---|---|
committer | 2018-06-27 13:21:00 +1000 | |
commit | bf380813829b11d42ff0703630600e5bee06098b (patch) | |
tree | 0c0951e0ec5c36a6de14535903092b539bdbbf9b /sway/desktop/layer_shell.c | |
parent | xwayland: accept configure requests from floating views (diff) | |
parent | Merge pull request #2162 from martinetd/float_xdg_shell (diff) | |
download | sway-bf380813829b11d42ff0703630600e5bee06098b.tar.gz sway-bf380813829b11d42ff0703630600e5bee06098b.tar.zst sway-bf380813829b11d42ff0703630600e5bee06098b.zip |
Merge branch 'master' into xwayland-wants-float
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r-- | sway/desktop/layer_shell.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 3accdefb..b57d1ee6 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 |