From 1ddd556f7513560ba75379265a75d871322c6222 Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Mon, 20 Jun 2022 19:12:19 +0200 Subject: Fix intermittent blanking/flickering Clearing and printing were done in two separate write syscalls. This fix consists in grouping them in the same write syscall by scheduling a clear in advance. This prevents UI glitches due to the delay between both writes. --- libtui/layout/layout.ha | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libtui/layout/layout.ha') diff --git a/libtui/layout/layout.ha b/libtui/layout/layout.ha index 8391c2f..b9d5672 100644 --- a/libtui/layout/layout.ha +++ b/libtui/layout/layout.ha @@ -19,7 +19,8 @@ export fn newlayout(widgets: *widget::widget...) layout = { // Display all the widgets contained in the given layout. export fn print(layout: layout) (void | widget::error) = { - libtui::clear(layout.widgets[0].ui); + //libtui::clear(layout.widgets[0].ui); + libtui::doclear(&layout.widgets[0].ui); for (let i = 0z; i < len(layout.widgets); i += 1) { match (layout.widgets[i].print) { case null => -- cgit v1.2.3