From db03b0898d51659b073523007c63733fce22321a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 25 Jun 2020 16:21:28 +0200 Subject: [PATCH] app/internal/window: run main on main thread on Android and iOS Before this change, Android and iOS were special for two reasons: app.Main would return immediately, and the program main was invoked from a goroutine. We can reduce that to one special case by either - run the program main from the main thread, - or make app.Main block. Choose to run main on the main thread. Signed-off-by: Elias Naur --- app/internal/window/runmain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/internal/window/runmain.go b/app/internal/window/runmain.go index 17d0c8d6..f9de5d04 100644 --- a/app/internal/window/runmain.go +++ b/app/internal/window/runmain.go @@ -24,6 +24,6 @@ func runMain() { // Indirect call, since the linker does not know the address of main when // laying down this package. fn := mainMain - go fn() + fn() }) }