diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-11 23:43:04 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-11 23:43:04 +0200 |
| commit | 5bec8f4fcb361d3c7527d367bc66c0810e3c91d9 (patch) | |
| tree | d75a4ea10140d854efbd8d2c4d9f7654c9b15c78 /src/XwaylandView.zig | |
| parent | b2f172e91b2d75b0b2af02621ab302afce3a94d6 (diff) | |
| download | river-5bec8f4fcb361d3c7527d367bc66c0810e3c91d9.tar.gz river-5bec8f4fcb361d3c7527d367bc66c0810e3c91d9.tar.xz | |
Only store mapped views in the view stack
Diffstat (limited to 'src/XwaylandView.zig')
| -rw-r--r-- | src/XwaylandView.zig | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/XwaylandView.zig b/src/XwaylandView.zig index a6bf0e1..dbd35e4 100644 --- a/src/XwaylandView.zig +++ b/src/XwaylandView.zig @@ -108,17 +108,13 @@ pub fn surfaceAt(self: Self, ox: f64, oy: f64, sx: *f64, sy: *f64) ?*c.wlr_surfa /// Called when the xwayland surface is destroyed fn handleDestroy(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void { const self = @fieldParentPtr(Self, "listen_destroy", listener.?); - const output = self.view.output; // Remove listeners that are active for the entire lifetime of the view c.wl_list_remove(&self.listen_destroy.link); c.wl_list_remove(&self.listen_map.link); c.wl_list_remove(&self.listen_unmap.link); - // Remove the view from the stack - const node = @fieldParentPtr(ViewStack(View).Node, "view", self.view); - output.views.remove(node); - output.root.server.allocator.destroy(node); + self.view.destroy(); } /// Called when the xwayland surface is mapped, or ready to display on-screen. |
