diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-19 11:08:49 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-19 11:08:49 +0200 |
| commit | 8b69c38cffabcad969a44b091ca7f2e8da1b5cdb (patch) | |
| tree | 37fede596408dbbaaa77db29671c54423fa83355 /src/Output.zig | |
| parent | f818ce7e389e4bcf5edcd467a8f59576dff25189 (diff) | |
| download | river-8b69c38cffabcad969a44b091ca7f2e8da1b5cdb.tar.gz river-8b69c38cffabcad969a44b091ca7f2e8da1b5cdb.tar.xz | |
Fix crash destroying output with layer surfaces
Diffstat (limited to 'src/Output.zig')
| -rw-r--r-- | src/Output.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Output.zig b/src/Output.zig index 7668928..67dedbf 100644 --- a/src/Output.zig +++ b/src/Output.zig @@ -502,14 +502,14 @@ fn handleDestroy(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void { for (self.layers) |*layer, layer_idx| { while (layer.pop()) |node| { const layer_surface = &node.data; - c.wlr_layer_surface_v1_close(layer_surface.wlr_layer_surface); // We need to move the closing layer surface to the noop output - // since it is not immediately destoryed. This just a request + // since it may not be immediately destoryed. This just a request // to close which will trigger unmap and destroy events in // response, and the LayerSurface needs a valid output to // handle them. root.noop_output.layers[layer_idx].prepend(node); layer_surface.output = &root.noop_output; + c.wlr_layer_surface_v1_close(layer_surface.wlr_layer_surface); } } |
