From bf678017ff13e9d76c57eb859a4eeb97f0c836a4 Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Sat, 21 Mar 2026 11:36:00 -0400 Subject: [PATCH] pass: no lid counter --- ly-ui/src/components/Label.zig | 3 --- src/config/custom.zig | 2 +- src/main.zig | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ly-ui/src/components/Label.zig b/ly-ui/src/components/Label.zig index 2ccb441..9874fcb 100644 --- a/ly-ui/src/components/Label.zig +++ b/ly-ui/src/components/Label.zig @@ -19,8 +19,6 @@ calculate_timeout_fn: ?*const fn (*Label, *anyopaque) anyerror!?usize, component_pos: Position, children_pos: Position, -pub var lidCounter: u64 = 0; - pub fn init( text: []const u8, max_width: ?usize, @@ -29,7 +27,6 @@ pub fn init( update_fn: ?*const fn (*Label, *anyopaque) anyerror!void, calculate_timeout_fn: ?*const fn (*Label, *anyopaque) anyerror!?usize, ) Label { - lidCounter += 1; return .{ .instance = null, .allocator = null, diff --git a/src/config/custom.zig b/src/config/custom.zig index 980b4fc..bd806d6 100644 --- a/src/config/custom.zig +++ b/src/config/custom.zig @@ -12,7 +12,7 @@ pub const UNDEFINED_CMD: []const u8 = "echo \"You forgot to define 'cmd'!\""; pub const CustomCommandInfo = struct { name: []const u8 = "", cmd: ?[]const u8 = null, - /// To be set to the label widget's `lid` + /// To be set to the label's widget ID id: u64 = 0, /// In frames, the refresh rate for the `cmd` to run again diff --git a/src/main.zig b/src/main.zig index 98a7fa1..d58592f 100644 --- a/src/main.zig +++ b/src/main.zig @@ -225,7 +225,6 @@ pub fn main() !void { custom.labels = .init(state.allocator); var config_parser = try IniParser(Config).init(state.allocator, config_path, migrator.configFieldHandler); defer config_parser.deinit(); - // mapping.deinit() has to be done here defer { if (!shutdown or !restart) { var iter = custom.binds.iterator();