diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2022-01-02 19:46:18 +0000 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2022-01-02 19:46:18 +0000 |
| commit | 1c515759b4b6c3d8e5acbed157480dab7da00383 (patch) | |
| tree | 8cdd62d51b0f345ff18ac069af50a4eadb60106a | |
| parent | e16eabd9282e77c89e47874838443fb34150b56d (diff) | |
| download | river-1c515759b4b6c3d8e5acbed157480dab7da00383.tar.gz river-1c515759b4b6c3d8e5acbed157480dab7da00383.tar.xz | |
Seat: do a better job of cleaning up listeners
I thought this should be fine as river won't yield to the event loop
when Seat.deinit() is called before the wlroots seat is destroyed, but
a segfault on exit has been reported with a stack trace mentioning
wlr_seat_destroy(). Let's hope this clears that up.
| -rw-r--r-- | river/Seat.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/river/Seat.zig b/river/Seat.zig index b029c72..a81f002 100644 --- a/river/Seat.zig +++ b/river/Seat.zig @@ -128,6 +128,12 @@ pub fn deinit(self: *Self) void { self.focus_stack.remove(node); util.gpa.destroy(node); } + + self.request_set_selection.link.remove(); + self.request_start_drag.link.remove(); + self.start_drag.link.remove(); + if (self.pointer_drag) self.pointer_drag_destroy.link.remove(); + self.request_set_primary_selection.link.remove(); } /// Set the current focus. If a visible view is passed it will be focused. |
