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/XdgToplevel.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/XdgToplevel.zig')
| -rw-r--r-- | src/XdgToplevel.zig | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/XdgToplevel.zig b/src/XdgToplevel.zig index a9c2040..95fee3e 100644 --- a/src/XdgToplevel.zig +++ b/src/XdgToplevel.zig @@ -110,10 +110,7 @@ fn handleDestroy(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void { 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 xdg surface is mapped, or ready to display on-screen. |
