From ccf7b0c159dddc0f2d5b0d792b3048042f64eac2 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 6 Feb 2016 15:54:29 +0900 Subject: [PATCH] Revert an unreasonable change at 633ee409 --- internal/ui/ui_glfw.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index b31863b3b..877015284 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -64,16 +64,10 @@ func Init() { func ExecOnUIThread(f func()) { ch := make(chan struct{}) - /*currentUI.funcs <- func() { + currentUI.funcs <- func() { defer close(ch) f() - }*/ - go func() { - defer close(ch) - runtime.LockOSThread() - currentUI.window.MakeContextCurrent() - f() - }() + } <-ch }