Closing windows is no longer a segfault
This commit is contained in:
parent
f65a9aaf12
commit
8304734230
3 changed files with 27 additions and 5 deletions
|
|
@ -35,6 +35,15 @@ fn windowListener(river_window_v1: *river.WindowV1, event: river.WindowV1.Event,
|
|||
switch (event) {
|
||||
.closed => {
|
||||
river_window_v1.destroy();
|
||||
{
|
||||
var it = window.context.wm.seats.iterator(.forward);
|
||||
while (it.next()) |seat| {
|
||||
if (seat.hovered == window) {
|
||||
seat.hovered = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
window.link.remove();
|
||||
window.context.allocator.destroy(window);
|
||||
},
|
||||
.dimensions => |ev| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue