refactor: add source location tracing for need_render calls

This commit is contained in:
CJ van den Berg 2026-01-15 17:16:07 +01:00
parent 58bd1fe12a
commit c3cf5ea02f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
13 changed files with 45 additions and 44 deletions

View file

@ -132,21 +132,21 @@ pub fn State(ctx_type: type) type {
pub fn receive(self: *Self, _: tp.pid_ref, m: tp.message) error{Exit}!bool {
if (try m.match(.{ "B", input.event.press, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.any, tp.any, tp.any })) {
self.active = true;
tui.need_render();
tui.need_render(@src());
return true;
} else if (try m.match(.{ "B", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.any, tp.any, tp.any })) {
self.opts.on_click(self.opts.ctx, self);
self.active = false;
tui.need_render();
tui.need_render(@src());
return true;
} else if (try m.match(.{ "D", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.any, tp.any, tp.any })) {
self.opts.on_click(self.opts.ctx, self);
self.active = false;
tui.need_render();
tui.need_render(@src());
return true;
} else if (try m.match(.{ "H", tp.extract(&self.hover) })) {
tui.rdr().request_mouse_cursor_pointer(self.hover);
tui.need_render();
tui.need_render(@src());
return true;
}
return false;