From 5dfb890cf841579edaeb2633025db218e86f45c2 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 20 Mar 2021 18:51:03 +0200 Subject: App: Periodic commands without timers/threads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now the periodic commands get posted on the main thread at intervals, and the event loop cooperates by not sleeping if there are periodic commands pending. The macOS animation hangup seems to be unrelated, though — perhaps some internal SDL/Metal machinery related to app refresh stopping for a while? --- src/ui/scrollwidget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/scrollwidget.c') diff --git a/src/ui/scrollwidget.c b/src/ui/scrollwidget.c index b5b204a1..55ede426 100644 --- a/src/ui/scrollwidget.c +++ b/src/ui/scrollwidget.c @@ -112,7 +112,7 @@ static void unfade_ScrollWidget_(iScrollWidget *d, float opacity) { d->willCheckFade = iTrue; /* TODO: This causes an inexplicable refresh issue on macOS: the drawing of one frame takes 100ms for some reason (not the current frame but some time after). */ -// add_Periodic(periodic_App(), d, "scrollbar.fade"); + add_Periodic(periodic_App(), d, "scrollbar.fade"); } refresh_Widget(d); } -- cgit v1.2.3