Skip to content

Commit

Permalink
layer-shell: replace close() with destroy()
Browse files Browse the repository at this point in the history
Update for the wlroots breaking change in [1].

[1]: swaywm/wlroots#3108
  • Loading branch information
emersion committed Aug 14, 2021
1 parent b17cf58 commit c9060bc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sway/desktop/layer_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ static void arrange_layer(struct sway_output *output, struct wl_list *list,
} else if ((state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM)) {
box.y -= state->margin.bottom;
}
if (box.width < 0 || box.height < 0) {
// TODO: Bubble up a protocol error?
wlr_layer_surface_v1_close(layer);
if (!sway_assert(box.width >= 0 && box.height >= 0,
"Expected layer surface to have positive size")) {
continue;
}
// Apply
Expand Down Expand Up @@ -287,7 +286,7 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) {
}

sway_layer->layer_surface->output = NULL;
wlr_layer_surface_v1_close(sway_layer->layer_surface);
wlr_layer_surface_v1_destroy(sway_layer->layer_surface);
}

static void handle_surface_commit(struct wl_listener *listener, void *data) {
Expand Down Expand Up @@ -623,7 +622,7 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
sway_log(SWAY_ERROR,
"no output to auto-assign layer surface '%s' to",
layer_surface->namespace);
wlr_layer_surface_v1_close(layer_surface);
wlr_layer_surface_v1_destroy(layer_surface);
return;
}
output = root->outputs->items[0];
Expand Down

0 comments on commit c9060bc

Please sign in to comment.