From a340a605a4ea2c22ded20edf30e24cade0823ae8 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 5 Jan 2022 18:13:08 +0100 Subject: [PATCH] Cursor: remove minor outdated workaround Since Zig 0.9 @tagName() and other similar builtins return 0 terminated data. --- river/Cursor.zig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/river/Cursor.zig b/river/Cursor.zig index 2e53202..19b9762 100644 --- a/river/Cursor.zig +++ b/river/Cursor.zig @@ -233,11 +233,7 @@ fn setImage(self: *Self, image: Image) void { if (image == self.image) return; self.image = image; - - // TODO: this is a workaround until updating to zig 0.9.0 - const image_z = util.gpa.dupeZ(u8, @tagName(image)) catch return; - defer util.gpa.free(image_z); - self.xcursor_manager.setCursorImage(image_z, self.wlr_cursor); + self.xcursor_manager.setCursorImage(@tagName(image), self.wlr_cursor); } fn clearFocus(self: *Self) void {