fix(tui): prevent render overload on high mouse report rates

This commit is contained in:
CJ van den Berg 2024-06-14 20:06:46 +02:00
parent 701107253f
commit 771c1dd980
2 changed files with 10 additions and 3 deletions

View file

@ -4,6 +4,7 @@ const tp = @import("thespian");
const Plane = @import("renderer").Plane;
const tui = @import("tui.zig");
pub const Box = @import("Box.zig");
pub const EventHandler = @import("EventHandler.zig");
pub const Theme = @import("theme");
@ -147,7 +148,7 @@ pub fn dynamic_cast(self: Self, comptime T: type) ?*T {
}
pub fn need_render() void {
tp.self_pid().send(.{"render"}) catch {};
tui.need_render();
}
pub fn need_reflow() void {