From 645893ea5962353804f2a4ba93ea27288d51d7bb Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 12 Jun 2014 09:57:50 -0400 Subject: [PATCH] Made the new dialog_windows.go not hang up uitask. --- dialog_windows.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dialog_windows.go b/dialog_windows.go index 45a2a73..5cc7b33 100644 --- a/dialog_windows.go +++ b/dialog_windows.go @@ -28,7 +28,7 @@ func _msgBox(parent *Window, primarytext string, secondarytext string, uType uin } retchan := make(chan int) go func() { - ret := make(chan uiret) + ret := make(chan int) defer close(ret) uitask <- func() { r1, _, err := _messageBox.Call( @@ -39,8 +39,9 @@ func _msgBox(parent *Window, primarytext string, secondarytext string, uType uin if r1 == 0 { // failure panic(fmt.Sprintf("error displaying message box to user: %v\nstyle: 0x%08X\ntitle: %q\ntext:\n%s", err, uType, os.Args[0], text)) } - retchan <- int(r1) + ret <- int(r1) // so as to not hang up uitask } + retchan <- <-ret }() return retchan }