Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
TabletTool: don't set wlr_tool.data to null on destroy
By the time handleDestroy is called, tool.wp_tool is already invalid as
wlroots destroys it when the associated wlr_tablet_tool is destroyed.
river/TabletTool.zig | 2 --
1 file changed, 2 deletions(-)
diff --git a/river/TabletTool.zig b/river/TabletTool.zig
index 1ec4920..0a8ab2d 100644
--- a/river/TabletTool.zig
+++ b/river/TabletTool.zig
@@ -78,8 +78,6 @@ fn create(wlr_seat: *wlr.Seat, wlr_tool: *wlr.TabletTool) error{OutOfMemory}!*Ta
fn handleDestroy(listener: *wl.Listener(*wlr.TabletTool), _: *wlr.TabletTool) void {
const tool: *TabletTool = @fieldParentPtr("destroy", listener);
- tool.wp_tool.wlr_tool.data = null;
-
tool.wlr_cursor.destroy();
tool.destroy.link.remove();