git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit1d222f913e57d3f91a97f38c1f3d5bff5426bd3c
parent5a21eff3cc
authorKirill Primak <[email protected]>
date2026-04-11 17:15
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();