diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2022-01-05 18:13:08 +0100 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2022-01-05 18:13:08 +0100 |
| commit | a340a605a4ea2c22ded20edf30e24cade0823ae8 (patch) | |
| tree | 79d48ab33bfc34aba26dfa8bb1af401d32ea18a6 | |
| parent | 1c515759b4b6c3d8e5acbed157480dab7da00383 (diff) | |
| download | river-a340a605a4ea2c22ded20edf30e24cade0823ae8.tar.gz river-a340a605a4ea2c22ded20edf30e24cade0823ae8.tar.xz | |
Cursor: remove minor outdated workaround
Since Zig 0.9 @tagName() and other similar builtins return 0 terminated
data.
| -rw-r--r-- | river/Cursor.zig | 6 |
1 files changed, 1 insertions, 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 { |
