mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 16:36:26 +01:00
layer-shell: replace close() with destroy()
Update for the wlroots breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3108
This commit is contained in:
parent
b17cf58a4d
commit
c9060bcc12
1 changed files with 4 additions and 5 deletions
|
@ -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)) {
|
} else if ((state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM)) {
|
||||||
box.y -= state->margin.bottom;
|
box.y -= state->margin.bottom;
|
||||||
}
|
}
|
||||||
if (box.width < 0 || box.height < 0) {
|
if (!sway_assert(box.width >= 0 && box.height >= 0,
|
||||||
// TODO: Bubble up a protocol error?
|
"Expected layer surface to have positive size")) {
|
||||||
wlr_layer_surface_v1_close(layer);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Apply
|
// Apply
|
||||||
|
@ -287,7 +286,7 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sway_layer->layer_surface->output = NULL;
|
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) {
|
static void handle_surface_commit(struct wl_listener *listener, void *data) {
|
||||||
|
@ -623,7 +622,7 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
|
||||||
sway_log(SWAY_ERROR,
|
sway_log(SWAY_ERROR,
|
||||||
"no output to auto-assign layer surface '%s' to",
|
"no output to auto-assign layer surface '%s' to",
|
||||||
layer_surface->namespace);
|
layer_surface->namespace);
|
||||||
wlr_layer_surface_v1_close(layer_surface);
|
wlr_layer_surface_v1_destroy(layer_surface);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
output = root->outputs->items[0];
|
output = root->outputs->items[0];
|
||||||
|
|
Loading…
Reference in a new issue