From 74b0f910e63c952764a49ac3ed6bd763f086cd9f Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 11 Jun 2024 07:35:39 -0700 Subject: [PATCH] ui: notify the ui-thread in shutdown hook --- basis/ui/ui.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index eac1d545f4a..a916d188045 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -218,7 +218,7 @@ STARTUP-HOOK: [ ] SHUTDOWN-HOOK: [ - close-all-windows notify-queued + ui-running? [ close-all-windows notify-ui-thread yield ] when ] HOOK: resize-window ui-backend ( world dim -- ) @@ -231,7 +231,7 @@ M: object resize-window 2drop ; : with-ui ( quot: ( -- ) -- ) ui-running? [ call( -- ) ] [ t ui-running set-global '[ - [ init-ui @ ] (with-ui) + _ (with-ui) ] [ f ui-running set-global ! Give running ui threads a chance to finish.