aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Bozhinov <ammen99@gmail.com>2019-09-13 12:51:53 +0200
committerSimon Ser <contact@emersion.fr>2019-09-13 13:58:58 +0300
commit8b0f1bc850de3bcf5354c8afa00b9f5b1768f370 (patch)
treeee0d1475c5ebcf66c0a1d84457ec56b5a6916786
parentbf90474b74064503be0957ae713db833ddec5529 (diff)
layer-shell: ignore ack_configure() on closed surfaces
When the surface is closed, we destroy all pending serials waiting to be accepted. This means we need to ignore any future ack events, because we can have the following events: 1. -> configure() 2. -> close() 3. <- ack_configure() At point 3, wlroots will error the client because of invalid serial, however the client hasn't processed close() yet.
-rw-r--r--types/wlr_layer_shell_v1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c
index bcc56cad..4b71ecda 100644
--- a/types/wlr_layer_shell_v1.c
+++ b/types/wlr_layer_shell_v1.c
@@ -61,7 +61,7 @@ static void layer_surface_handle_ack_configure(struct wl_client *client,
bool found = false;
struct wlr_layer_surface_v1_configure *configure, *tmp;
- if (!surface) {
+ if (!surface || surface->closed) {
return;
}
wl_list_for_each_safe(configure, tmp, &surface->configure_list, link) {