aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-28 18:10:43 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-28 18:11:03 -0400
commit8d6bce02afc656bf792815ed68121f4e614cd175 (patch)
treeb28c55c464feb85c61f314a26487404fd63f4fb3 /sway/desktop/layer_shell.c
parentRender layer surfaces and respect exclusive zone (diff)
downloadsway-8d6bce02afc656bf792815ed68121f4e614cd175.tar.gz
sway-8d6bce02afc656bf792815ed68121f4e614cd175.tar.zst
sway-8d6bce02afc656bf792815ed68121f4e614cd175.zip
Address review feedback
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index a2506d21..bd62f84a 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -192,9 +192,10 @@ void arrange_layers(struct sway_output *output) {
192static void handle_output_destroy(struct wl_listener *listener, void *data) { 192static void handle_output_destroy(struct wl_listener *listener, void *data) {
193 struct sway_layer_surface *sway_layer = 193 struct sway_layer_surface *sway_layer =
194 wl_container_of(listener, sway_layer, output_destroy); 194 wl_container_of(listener, sway_layer, output_destroy);
195 sway_layer->layer_surface->output = NULL;
196 wl_list_remove(&sway_layer->output_destroy.link); 195 wl_list_remove(&sway_layer->output_destroy.link);
197 wl_list_remove(&sway_layer->output_mode.link); 196 wl_list_remove(&sway_layer->output_mode.link);
197 wl_list_remove(&sway_layer->output_transform.link);
198 sway_layer->layer_surface->output = NULL;
198 wlr_layer_surface_close(sway_layer->layer_surface); 199 wlr_layer_surface_close(sway_layer->layer_surface);
199} 200}
200 201
@@ -240,9 +241,11 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
240 wl_list_remove(&sway_layer->map.link); 241 wl_list_remove(&sway_layer->map.link);
241 wl_list_remove(&sway_layer->unmap.link); 242 wl_list_remove(&sway_layer->unmap.link);
242 wl_list_remove(&sway_layer->surface_commit.link); 243 wl_list_remove(&sway_layer->surface_commit.link);
243 wl_list_remove(&sway_layer->output_destroy.link); 244 if (sway_layer->layer_surface->output != NULL) {
244 wl_list_remove(&sway_layer->output_mode.link); 245 wl_list_remove(&sway_layer->output_destroy.link);
245 wl_list_remove(&sway_layer->output_transform.link); 246 wl_list_remove(&sway_layer->output_mode.link);
247 wl_list_remove(&sway_layer->output_transform.link);
248 }
246 struct sway_output *output = sway_layer->layer_surface->output->data; 249 struct sway_output *output = sway_layer->layer_surface->output->data;
247 arrange_layers(output); 250 arrange_layers(output);
248 free(sway_layer); 251 free(sway_layer);